public HomeController() { var config = new CloudConfig { StorageServiceAccountName = ConfigurationSettings.AppSettings["StorageServiceAccountName"], StorageServiceAccessKey = ConfigurationSettings.AppSettings["StorageServiceAccessKey"], CdnEndpointName = ConfigurationSettings.AppSettings["CdnEndpointName"] }; if (config.IsEmpty) { _cloud = new Cloud(@"d:\config.json"); } else { _cloud = new Cloud(config); } }
public Cloud(CloudConfig config) { _config = config; }
public Cloud(string configurationPath) { var json = File.ReadAllText(configurationPath); _config = JsonConvert.DeserializeObject <CloudConfig>(json); }
public Cloud(string configurationPath) { var json = File.ReadAllText(configurationPath); _config = JsonConvert.DeserializeObject<CloudConfig>(json); }