コード例 #1
0
ファイル: Http.cs プロジェクト: stjordanis/nem1-sdk-csharp
        /// <summary>
        /// Initializes a new instance of the <see cref="HttpRouter"/> class.
        /// </summary>
        /// <param name="host">The host.</param>
        /// <param name="networkHttp">The network HTTP.</param>
        protected HttpRouter(string host, NodeHttp networkHttp)
        {
            if (string.IsNullOrEmpty(host))
            {
                throw new ArgumentException("Value cannot be null or empty.", nameof(host));
            }

            NodeHttp = networkHttp ?? throw new ArgumentNullException(nameof(networkHttp));

            Url = host;

            Client = new WebClient();
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BlockchainHttp" /> class.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="networkHttp">The network HTTP.</param>
 /// <exception cref="ArgumentNullException">networkHttp</exception>
 /// <exception cref="ArgumentException">Value cannot be null or empty. - host</exception>
 public BlockchainHttp(string host, NodeHttp networkHttp) : base(host, networkHttp)
 {
     BlockchainRoutesApi = new BlockchainRoutesApi(Url);
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TransactionHttp" /> class.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="networkHttp">The network HTTP.</param>
 /// <exception cref="ArgumentNullException">networkHttp</exception>
 /// <exception cref="ArgumentException">Value cannot be null or empty. - host</exception>
 public TransactionHttp(string host, NodeHttp networkHttp) : base(host, networkHttp)
 {
     TransactionRoutesApi = new TransactionRoutesApi(host);
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NamespaceMosaicHttp" /> class.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="networkHttp">The network HTTP.</param>
 /// <exception cref="ArgumentNullException">networkHttp</exception>
 /// <exception cref="ArgumentException">Value cannot be null or empty. - host</exception>
 public NamespaceMosaicHttp(string host, NodeHttp networkHttp) : base(host, networkHttp)
 {
     NamespaceMosaicRoutesApi = new NamespaceMosaicRoutesApi(host);
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AccountHttp" /> class.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="networkHttp">The network HTTP.</param>
 /// <exception cref="ArgumentException">Value cannot be null or empty. - host</exception>
 public AccountHttp(string host, NodeHttp networkHttp) : base(host, networkHttp)
 {
     AccountRoutesApi = new AccountRoutesApi(host);
 }