/// <summary> /// Creates a new instance with the service to use and the app settings. /// </summary> /// <param name="participantPersonsSevisService">The service.</param> /// <param name="exchangeVisitorValidationService">The exchange visitor validation service.</param> /// <param name="appSettings">The app settings.</param> public Functions(IParticipantPersonsSevisService participantPersonsSevisService, IExchangeVisitorValidationService exchangeVisitorValidationService, AppSettings appSettings) { Contract.Requires(participantPersonsSevisService != null, "The service must not be null."); Contract.Requires(appSettings != null, "The app settings must not be null."); Contract.Requires(exchangeVisitorValidationService != null, "The exchange visitor validation service must not be null."); this.participantPersonsSevisService = participantPersonsSevisService; this.appSettings = appSettings; this.exchangeVisitorValidationService = exchangeVisitorValidationService; }
/// <summary> /// Creates a new instance and initializes it with the given dependencies. /// </summary> /// <param name="validationService">The exchange visitor validation service.</param> /// <param name="userProvider">The user provider delegate.</param> public ExchangeVisitorSaveAction(IExchangeVisitorValidationService validationService) { Contract.Requires(validationService != null, "The validation service must not be null."); this.validationService = validationService; this.CreatedObjects = new List <object>(); this.ModifiedObjects = new List <object>(); this.DeletedObjects = new List <object>(); this.ParticipantIds = new HashSet <int>(); }