using System; using System.Collections.Generic; namespace sharp.jsonrpc { public class RPCCall { public RPCConnector Connector { get; private set; } public String MethodName { get; private set; } public Dictionary args; public RPCCall(RPCConnector connector) { this.Connector = connector; this.args = new Dictionary(); } public RPCCall method(string method){ this.MethodName = method; return this; } public RPCCall parameter(string name,object value){ this.args.Add(name,value); return this; } public Response execute(){ return Connector.Call(this.MethodName,this.args); } } }