예제 #1
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()
     });
 }
예제 #2
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);
        }