Share via


JsonRpcRequest.TryGetTypedArguments Method

Definition

Gets the arguments to supply to the method invocation, coerced to types that will satisfy the given list of parameters.

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

parameters
ReadOnlySpan<ParameterInfo>

The list of parameters that the arguments must satisfy.

typedArguments
Span<Object>

An array to initialize with arguments that can satisfy CLR type requirements for each of the parameters. The length of this span must equal the length of parameters.

Returns

true if all the arguments can conform to the types of the parameters and typedArguments is initialized; false otherwise.

Exceptions

Thrown if the argument exists, but cannot be deserialized.

Applies to