private static ConfigurationFromConfigSettings LoadConfigurationFromConfigFile() { var section = ConfigurationManager.GetSection("realEx") as NameValueCollection; if (section == null) { return(new ConfigurationFromConfigSettings()); } var configuration = new ConfigurationFromConfigSettings { Currency = GetValue(x => x.Currency, section), MerchantId = GetValue(x => x.MerchantId, section), Mode = (AccountMode)Enum.Parse(typeof(AccountMode), (GetValue(x => x.Mode, section) ?? "Test")), SharedSecret = GetValue(x => x.SharedSecret, section), SubAccount = GetValue(x => x.SubAccount, section), UrlEndPoint = GetValue(x => x.UrlEndPoint, section) }; return(configuration); }
private static ConfigurationFromConfigSettings LoadConfigurationFromConfigFile() { var section = ConfigurationManager.GetSection("realEx") as NameValueCollection; if (section == null) { return new ConfigurationFromConfigSettings(); } var configuration = new ConfigurationFromConfigSettings { Currency = GetValue(x => x.Currency, section), MerchantId = GetValue(x => x.MerchantId, section), Mode = (AccountMode)Enum.Parse(typeof(AccountMode), (GetValue(x => x.Mode, section) ?? "Test")), SharedSecret = GetValue(x => x.SharedSecret, section), SubAccount = GetValue(x => x.SubAccount, section), UrlEndPoint = GetValue(x => x.UrlEndPoint, section) }; return configuration; }