Ejemplo n.º 1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="reader"></param>
        /// <returns></returns>
        public static JSONRpcCall ParseRPC(TextReader reader)
        {
            JSONRpcCall call = new JSONRpcCall();
            object obj = ParseJSON(reader);
            Hashtable jsonRpc = (Hashtable) obj;

            call.Method = (string) jsonRpc["method"];
            call.Id = (string) jsonRpc["id"];
            call.Args = (ArrayList) jsonRpc["params"];

            return call;
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="reader"></param>
        /// <returns></returns>
        public static JSONRpcCall ParseRPC(TextReader reader)
        {
            JSONRpcCall call    = new JSONRpcCall();
            object      obj     = ParseJSON(reader);
            Hashtable   jsonRpc = (Hashtable)obj;

            call.Method = (string)jsonRpc["method"];
            call.Id     = (string)jsonRpc["id"];
            call.Args   = (ArrayList)jsonRpc["params"];

            return(call);
        }