Remove JSON references
parent
cd94cf7201
commit
2cdd9d13fa
|
@ -14,42 +14,6 @@ namespace ln.types.rpc
|
|||
{
|
||||
Identifier = Guid.NewGuid();
|
||||
}
|
||||
/*
|
||||
public RPCCall(JObject json)
|
||||
{
|
||||
if (json.ContainsKey("id"))
|
||||
{
|
||||
switch (json["id"].Type)
|
||||
{
|
||||
case JTokenType.Integer:
|
||||
Identifier = json["id"].ToObject<int>();
|
||||
break;
|
||||
case JTokenType.Float:
|
||||
Identifier = json["id"].ToObject<float>();
|
||||
break;
|
||||
case JTokenType.String:
|
||||
Identifier = json["id"].ToObject<string>();
|
||||
break;
|
||||
default:
|
||||
throw new NotSupportedException(String.Format("JToken {0} is not supported as RPCCall.Identifier",json["id"]));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Identifier = Guid.NewGuid();
|
||||
}
|
||||
|
||||
if (json.ContainsKey("module"))
|
||||
ModuleName = json["module"].ToObject<string>();
|
||||
|
||||
if (json.ContainsKey("method"))
|
||||
MethodName = json["method"].ToObject<string>();
|
||||
|
||||
if (json.ContainsKey("parameters"))
|
||||
Parameters = json["parameters"].ToObject<object[]>();
|
||||
else
|
||||
Parameters = new object[0];
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,25 +25,6 @@ namespace ln.types.rpc
|
|||
Exception = e;
|
||||
ErrorText = e.ToString();
|
||||
}
|
||||
/*
|
||||
public JObject ToJSON()
|
||||
{
|
||||
JObject result = new JObject();
|
||||
result["id"] = JToken.FromObject(Identifier);
|
||||
|
||||
if (ErrorText != null)
|
||||
{
|
||||
result["error"] = new JObject();
|
||||
result["error"]["message"] = JToken.FromObject(ErrorText);
|
||||
result["error"]["exception"] = JToken.FromObject(Exception);
|
||||
}
|
||||
else
|
||||
{
|
||||
result["result"] = JToken.FromObject(Result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue