/// <summary>Initializes a new instance of the <see cref="JsonRpcRequestContract" /> class.</summary> /// <param name="parameters">The contract for parameters, provided by name.</param> /// <exception cref="ArgumentNullException"><paramref name="parameters" /> is <see langword="null" />.</exception> public JsonRpcRequestContract(IReadOnlyDictionary <string, Type> parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } _parametersType = JsonRpcParametersType.ByName; _parametersByName = parameters; }
/// <summary>Initializes a new instance of the <see cref="JsonRpcRequestContract" /> class.</summary> /// <param name="parameters">The contract for parameters, provided by position.</param> /// <exception cref="ArgumentNullException"><paramref name="parameters" /> is <see langword="null" />.</exception> public JsonRpcRequestContract(IReadOnlyList <Type> parameters) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } _parametersType = JsonRpcParametersType.ByPosition; _parametersByPosition = parameters; }