Пример #1
0
 public SftpHandler(IAppSetting appSettings)
 {
     _hostName    = (string)appSettings.Settings["EdgeFTPHost"];
     _userName    = (string)appSettings.Settings["EdgeFTPUsername"];
     _password    = SecureAppSetting.Decrypt((string)appSettings.Settings["EdgeFTPPassword"]);
     _fingerPrint = SecureAppSetting.Decrypt((string)appSettings.Settings["EdgeFTPKey"]);
     _portNumber  = Convert.ToInt32(appSettings.Settings["EdgeFTPPort"]);
 }
Пример #2
0
        protected HandlerBase(IAppSetting appSetting)
        {
            AppSetting = appSetting;
            var providerCode   = appSetting.Settings["ProviderCode"];
            var xRefMerchantId = appSetting.Settings["XrefMerchantId"];

            if (providerCode == null)
            {
                throw new ArgumentException("Provider Code is not present in the Config!");
            }
            if (xRefMerchantId == null)
            {
                throw new ArgumentException("XRefMerchantId is not present in the Config!");
            }
            ProviderCode    = providerCode.ToString();
            XRefMerchantId  = xRefMerchantId.ToString();
            ServiceUsername = SecureAppSetting.Decrypt(appSetting.Settings["EdgeServiceUsername"].ToString());
            ServicePassword = SecureAppSetting.Decrypt(appSetting.Settings["EdgeServicePassword"].ToString());
        }