public OptionsModel( IOptionTasks optionTasks, IOutlookAccountPasswordProvider outlookAccountPasswordProvider, Contracts.Options data, GeneralOptions generalOptions, IProfileModelFactory profileModelFactory, bool isGoogle, OptionModelSessionData sessionData, IServerSettingsDetector serverSettingsDetector) { if (data == null) { throw new ArgumentNullException(nameof(data)); } if (serverSettingsDetector == null) { throw new ArgumentNullException(nameof(serverSettingsDetector)); } _mappingConfigurationModelFactory = new MappingConfigurationModelFactory(sessionData); _optionTasks = optionTasks ?? throw new ArgumentNullException(nameof(optionTasks)); _outlookAccountPasswordProvider = outlookAccountPasswordProvider ?? throw new ArgumentNullException(nameof(outlookAccountPasswordProvider)); _generalOptions = generalOptions ?? throw new ArgumentNullException(nameof(generalOptions)); ModelFactory = profileModelFactory ?? throw new ArgumentNullException(nameof(profileModelFactory)); _sessionData = sessionData ?? throw new ArgumentNullException(nameof(sessionData)); Id = data.Id; _isGoogle = isGoogle; _serverSettingsDetector = serverSettingsDetector; InitializeData(data); }
public OptionsModel( ISettingsFaultFinder faultFinder, IOptionTasks optionTasks, IOutlookAccountPasswordProvider outlookAccountPasswordProvider, Contracts.Options data, GeneralOptions generalOptions, IProfileType profileType, bool isGoogle, OptionModelSessionData sessionData) { if (data == null) { throw new ArgumentNullException(nameof(data)); } _mappingConfigurationModelFactory = new MappingConfigurationModelFactory(sessionData); _faultFinder = faultFinder ?? throw new ArgumentNullException(nameof(faultFinder)); _optionTasks = optionTasks ?? throw new ArgumentNullException(nameof(optionTasks)); _outlookAccountPasswordProvider = outlookAccountPasswordProvider ?? throw new ArgumentNullException(nameof(outlookAccountPasswordProvider)); _generalOptions = generalOptions ?? throw new ArgumentNullException(nameof(generalOptions)); ProfileType = profileType ?? throw new ArgumentNullException(nameof(profileType)); _sessionData = sessionData ?? throw new ArgumentNullException(nameof(sessionData)); Id = data.Id; _isGoogle = isGoogle; InitializeData(data); }