/// <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(); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }