/// <param name="id">Request id</param> /// <param name="method">Target method name</param> /// <param name="parameterList">Json parameters for the target method</param> public RpcRequest(RpcId id, string method, JToken parameters) { this.Id = id; this.JsonRpcVersion = JsonRpcContants.JsonRpcVersion; this.Method = method; this.Parameters = parameters; }
/// <param name="id">Request id</param> /// <param name="method">Target method name</param> /// <param name="parameterList">Json parameters for the target method</param> public RpcRequest(RpcId id, string method, RpcParameters parameters = default) { this.Id = id; this.JsonRpcVersion = JsonRpcContants.JsonRpcVersion; this.Method = method; this.Parameters = parameters; }
public RpcResponse(RpcId id, T result) : base(id, result) { }
public RpcResponse(RpcId id, RpcError error) : base(id, error) { }
/// <param name="id">Request id</param> /// <param name="result">Response result object</param> public RpcResponse(RpcId id, JToken result) : this(id) { this.Result = result; }
/// <param name="id">Request id</param> /// <param name="error">Request error</param> public RpcResponse(RpcId id, RpcError error) : this(id) { this.Error = error; }
/// <param name="id">Request id</param> protected RpcResponse(RpcId id) { this.Id = id.HasValue ? id : null; }
public static RpcRequest WithNoParameters(string method, RpcId id = default) { return(RpcRequest.WithParameters(method, default, id));
/// <param name="id">Request id</param> /// <param name="method">Target method name</param> /// <param name="parameterList">Json parameters for the target method</param> public RpcRequest(RpcId id, string method, RpcParameters parameters = default) { this.Id = id; this.Method = method; this.Parameters = parameters; }
public RpcResponse(RpcId id, T result) : base(id, result, typeof(T)) { }