public IntersurfScheduleSaver(ILogger logger, IntersurfSettings intersurfSettings, IAOProductService aoProductService)
 {
     this._logger            = logger;
     this._intersurfSettings = intersurfSettings;
     this._destinationPath   = AppDomain.CurrentDomain.BaseDirectory + @"\" + _intersurfSettings.CSVFileName;
     this._aoProductService  = aoProductService;
 }
예제 #2
0
        internal static void ValidateSettings(IntersurfSettings intersurfSettings)
        {
            if (intersurfSettings == null)
            {
                throw new Exception("No Intersurf settings found, aborting task");
            }

            if (string.IsNullOrEmpty(intersurfSettings.EndpointAddress))
            {
                throw new Exception("No EndpointAddress found in Intersurf settings, aborting task");
            }

            if (string.IsNullOrEmpty(intersurfSettings.Username))
            {
                throw new Exception("No Username found in Intersurf settings, aborting task");
            }

            if (string.IsNullOrEmpty(intersurfSettings.Password))
            {
                throw new Exception("No Password found in Intersurf settings, aborting task");
            }

            if (string.IsNullOrEmpty(intersurfSettings.CSVFileName))
            {
                throw new Exception("No CSVFileName found in Intersurf settings, aborting task");
            }

            if (intersurfSettings.CSVFileName.EndsWith(".csv") == false)
            {
                throw new Exception("CSVFileName must end with '.csv', aborting task");
            }
        }
 public IntersurfController(ILogger logger, IntersurfSettings stmSettings, ISettingService settingService)
 {
     this._logger         = logger;
     this._stmSettings    = stmSettings;
     this._settingService = settingService;
 }
예제 #4
0
 public IntersurfScheduleFetcher(ILogger logger, IntersurfSettings intersurfSettings)
 {
     this._logger            = logger;
     this._intersurfSettings = intersurfSettings;
     this._destinationPath   = AppDomain.CurrentDomain.BaseDirectory + @"\" + _intersurfSettings.CSVFileName;
 }