Exemplo n.º 1
0
 public NeoScanRestService(NeoScanNet net)
 {
     _restClient = net == NeoScanNet.MainNet
         ? new HttpClient {
         BaseAddress = new Uri(neoScanMainNetUrl)
     }
         : new HttpClient {
         BaseAddress = new Uri(neoScanTestNetUrl)
     };
 }
Exemplo n.º 2
0
 public void ChangeNet(NeoScanNet net)
 {
     if (_restClient != null)
     {
         if (net == NeoScanNet.MainNet)
         {
             _restClient.BaseAddress = new Uri(neoScanMainNetUrl);
         }
         else
         {
             _restClient.BaseAddress = new Uri(neoScanTestNetUrl);
         }
     }
 }
Exemplo n.º 3
0
        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;
            }
        }