JsonRpc.GetJsonRpcMethodAttribute 方法

定义

JsonRpcMethodAttribute获取以前发现的 RPC 方法(如果有)。

public StreamJsonRpc.JsonRpcMethodAttribute? GetJsonRpcMethodAttribute (string methodName, ReadOnlySpan<System.Reflection.ParameterInfo> parameters);
member this.GetJsonRpcMethodAttribute : string * ReadOnlySpan<System.Reflection.ParameterInfo> -> StreamJsonRpc.JsonRpcMethodAttribute
Public Function GetJsonRpcMethodAttribute (methodName As String, parameters As ReadOnlySpan(Of ParameterInfo)) As JsonRpcMethodAttribute

参数

methodName
String

要为其查找属性的方法的名称。

parameters
ReadOnlySpan<ParameterInfo>

方法上找到的参数列表,因为它们可能被赋予 TryGetTypedArguments(ReadOnlySpan<ParameterInfo>, Span<Object>)。 请注意,此列表可能会省略一些特殊参数,例如尾随 CancellationToken

返回

适用于