Пример #1
0
 public virtual Network GetNetwork(ChainName chainName)
 {
     if (chainName == null)
     {
         throw new ArgumentNullException(nameof(chainName));
     }
     if (chainName == ChainName.Mainnet)
     {
         return(Mainnet);
     }
     if (chainName == ChainName.Testnet)
     {
         return(Testnet);
     }
     if (chainName == ChainName.Regtest)
     {
         return(Regtest);
     }
     throw new NotSupportedException(chainName.ToString());
 }
 public static string GetFolderName(ChainName chainName)
 {
     if (chainName == null)
     {
         throw new ArgumentNullException(nameof(chainName));
     }
     if (chainName == ChainName.Mainnet)
     {
         return("Main");
     }
     if (chainName == ChainName.Testnet)
     {
         return("TestNet");
     }
     if (chainName == ChainName.Regtest)
     {
         return("RegTest");
     }
     return(chainName.ToString());
 }