public NeoScanRestService(NeoScanNet net) { _restClient = net == NeoScanNet.MainNet ? new HttpClient { BaseAddress = new Uri(neoScanMainNetUrl) } : new HttpClient { BaseAddress = new Uri(neoScanTestNetUrl) }; }
public void ChangeNet(NeoScanNet net) { if (_restClient != null) { if (net == NeoScanNet.MainNet) { _restClient.BaseAddress = new Uri(neoScanMainNetUrl); } else { _restClient.BaseAddress = new Uri(neoScanTestNetUrl); } } }
public void ChangeNet(NeoScanNet net) { if (_restClient == null) { return; } switch (net) { case NeoScanNet.MainNet: _restClient.BaseAddress = new Uri(neoScanMainNetUrl); return; case NeoScanNet.TestNet: _restClient.BaseAddress = new Uri(neoScanTestNetUrl); return; } }