示例#1
0
        public static RpcPeer FromJson(JObject json)
        {
            RpcPeer peer = new RpcPeer();

            peer.Address = json["address"].AsString();
            peer.Port    = int.Parse(json["port"].AsString());
            return(peer);
        }
示例#2
0
 public static RpcPeers FromJson(JObject json)
 {
     return(new RpcPeers
     {
         Unconnected = ((JArray)json["unconnected"]).Select(p => RpcPeer.FromJson(p)).ToArray(),
         Bad = ((JArray)json["bad"]).Select(p => RpcPeer.FromJson(p)).ToArray(),
         Connected = ((JArray)json["connected"]).Select(p => RpcPeer.FromJson(p)).ToArray()
     });
 }
示例#3
0
        public static RpcPeers FromJson(JObject json)
        {
            RpcPeers result = new RpcPeers();

            result.Unconnected = ((JArray)json["unconnected"]).Select(p => RpcPeer.FromJson(p)).ToArray();
            result.Bad         = ((JArray)json["bad"]).Select(p => RpcPeer.FromJson(p)).ToArray();
            result.Connected   = ((JArray)json["connected"]).Select(p => RpcPeer.FromJson(p)).ToArray();
            return(result);
        }