internal static StringBuilder AppendId(this StringBuilder json, JsonRpcMessageId id)
 {
     if (id.IsString)
     {
         if (id.String == null)
         {
             return(json);
         }
         return(json.Append($", \"id\": \"{id.String}\""));
     }
     return(json.Append($", \"id\": {id.Number.ToString()}"));
 }
 public JsonRpcRequest(JsonRpcMessageId id, String method, IList <Object> parameters = null) : base(id)
 {
     Method               = method;
     ParametersAreNamed   = false;
     PositionalParameters = parameters;
 }
 public JsonRpcRequest(JsonRpcMessageId id, String method, IDictionary <String, Object> parameters = null) : base(id)
 {
     Method             = method;
     ParametersAreNamed = true;
     NamedParameters    = parameters;
 }
 protected JsonRpcMessage(JsonRpcMessageId id)
 {
     Id = id;
 }
 public JsonRpcErrorResponse(JsonRpcMessageId id, Int32 error, String message, String data = null) : this(id, (JsonRpcError)error, message, data)
 {
 }
 public JsonRpcErrorResponse(JsonRpcMessageId id, JsonRpcError error, String message, String data = null) : base(id)
 {
     Error   = error;
     Message = message;
     Data    = data;
 }
 public JsonRpcResultResponse(JsonRpcMessageId id, String jsonResult) : base(id)
 {
     m_jsonResult = jsonResult;
 }
 protected JsonRpcResponse(JsonRpcMessageId id) : base(id)
 {
 }