JsonRpcRequest.TryGetTypedArguments 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得參數以供方法調用,並強制使用能滿足指定參數列表的型別。
public virtual StreamJsonRpc.Protocol.JsonRpcRequest.ArgumentMatchResult TryGetTypedArguments(ReadOnlySpan<System.Reflection.ParameterInfo> parameters, Span<object> typedArguments);
public virtual StreamJsonRpc.Protocol.JsonRpcRequest.ArgumentMatchResult TryGetTypedArguments(ReadOnlySpan<System.Reflection.ParameterInfo> parameters, Span<object?> typedArguments);
abstract member TryGetTypedArguments : ReadOnlySpan<System.Reflection.ParameterInfo> * Span<obj> -> StreamJsonRpc.Protocol.JsonRpcRequest.ArgumentMatchResult
override this.TryGetTypedArguments : ReadOnlySpan<System.Reflection.ParameterInfo> * Span<obj> -> StreamJsonRpc.Protocol.JsonRpcRequest.ArgumentMatchResult
Public Overridable Function TryGetTypedArguments (parameters As ReadOnlySpan(Of ParameterInfo), typedArguments As Span(Of Object)) As JsonRpcRequest.ArgumentMatchResult
參數
- parameters
- ReadOnlySpan<ParameterInfo>
參數必須滿足的參數列表。
傳回
true 如果所有參數都能符合 的類型 parameters ,且 typedArguments 被初始化; false 否則。
例外狀況
當參數存在但無法反序列化時,會拋出。