public Settings() { if (NeedUpgrade) { Upgrade(); NeedUpgrade = false; Save(); } IConfigurationSection section = new ConfigurationBuilder().AddJsonFile("config.json").Build().GetSection("ApplicationConfiguration"); this.Paths = new PathsSettings(section.GetSection("Paths")); this.P2P = new P2PSettings(section.GetSection("P2P")); this.Urls = new BrowserSettings(section.GetSection("Urls")); this.Contracts = new ContractSettings(section.GetSection("Contracts")); }
public Settings() { if (NeedUpgrade) { Upgrade(); NeedUpgrade = false; Save(); } IConfigurationSection section = new ConfigurationBuilder().AddJsonFile("config.json").Build().GetSection("ApplicationConfiguration"); this.DataDirectoryPath = section.GetSection("DataDirectoryPath").Value; this.CertCachePath = section.GetSection("CertCachePath").Value; this.NodePort = ushort.Parse(section.GetSection("NodePort").Value); this.WsPort = ushort.Parse(section.GetSection("WsPort").Value); this.Urls = new BrowserSettings(section.GetSection("Urls")); this.Contracts = new ContractSettings(section.GetSection("Contracts")); }