ReflectedMethodDescriptorProvider.TryGetMethod Method
.NET Framework 4
Searches the specified hub for the specified method.
Namespace: Microsoft.AspNet.SignalR.Hubs
Assembly: Microsoft.AspNet.SignalR.Core (in Microsoft.AspNet.SignalR.Core.dll)
Syntax
'Declaration
Public Function TryGetMethod ( _
hub As HubDescriptor, _
method As String, _
<OutAttribute> ByRef descriptor As MethodDescriptor, _
parameters As IList(Of IJsonValue) _
) As Boolean
'Usage
Dim instance As ReflectedMethodDescriptorProvider
Dim hub As HubDescriptor
Dim method As String
Dim descriptor As MethodDescriptor
Dim parameters As IList(Of IJsonValue)
Dim returnValue As Boolean
returnValue = instance.TryGetMethod(hub, _
method, descriptor, parameters)
public bool TryGetMethod(
HubDescriptor hub,
string method,
out MethodDescriptor descriptor,
IList<IJsonValue> parameters
)
public:
virtual bool TryGetMethod(
HubDescriptor^ hub,
String^ method,
[OutAttribute] MethodDescriptor^% descriptor,
IList<IJsonValue^>^ parameters
) sealed
abstract TryGetMethod :
hub:HubDescriptor *
method:string *
descriptor:MethodDescriptor byref *
parameters:IList<IJsonValue> -> bool
override TryGetMethod :
hub:HubDescriptor *
method:string *
descriptor:MethodDescriptor byref *
parameters:IList<IJsonValue> -> bool
public final function TryGetMethod(
hub : HubDescriptor,
method : String,
descriptor : MethodDescriptor,
parameters : IList<IJsonValue>
) : boolean
Parameters
- hub
Type: Microsoft.AspNet.SignalR.Hubs.HubDescriptor
Hub to search for the specified method on.
- method
Type: System.String
The method name to search for.
- descriptor
Type: Microsoft.AspNet.SignalR.Hubs.MethodDescriptor%
If successful, the MethodDescriptor that was resolved.
- parameters
Type: System.Collections.Generic.IList<IJsonValue>
The set of parameters that will be used to help locate a specific overload of the specified method.
Return Value
Type: System.Boolean
true if the method matching the name/parameter set is found on the hub, otherwise false.
Implements
IMethodDescriptorProvider.TryGetMethod(HubDescriptor, String, MethodDescriptor%, IList<IJsonValue>)
Remarks
In the case that there are multiple overloads of the specified method, the parameters parameter set helps determine exactly which instance of the overload should be resolved. If there are multiple overloads found with the same number of matching parameters, none of the methods will be returned because it is not possible to determine which overload of the method was intended to be resolved.