コード例 #1
0
        public static ConnectionConfig CreateWithStorageConnection(StorageConnection storageConnection)
        {
            var storageNodeClient           = new StorageNodeClient(storageConnection);
            var blockchainNetwork           = storageNodeClient.GetNodeInfo().Wait().BlockchainNetwork;
            var blockchainNetworkConnection = new BlockchainNetworkConnection(
                BlockchainNetworkTypeConverter.GetNetworkType(blockchainNetwork.NetworkType),
                blockchainNetwork.Host,
                blockchainNetwork.Port,
                HttpProtocolConverter.GetHttpProtocol(blockchainNetwork.Protocol)
                );

            return(new ConnectionConfig(blockchainNetworkConnection, storageConnection));
        }
コード例 #2
0
 public static ConnectionConfig CreateWithStorageConnection(
     BlockchainNetworkConnection blockchainNetworkConnection, StorageConnection storageConnection)
 {
     return(new ConnectionConfig(blockchainNetworkConnection, storageConnection));
 }