JsonRpc.GetJsonRpcMethodAttribute 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
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。