public SponsorService( IRepository<Sponsor> personRepositoryInstance, IRepository<SponsorActivity> repositorySponsorActivityInstance, IDaysInOfficeStrategy daysInOfficeStrategy) { if (personRepositoryInstance == null) throw new ArgumentNullException("personRepositoryInstance", "personRepositoryInstance is null."); _RepositoryInstance = personRepositoryInstance; _RepositorySponsorActivityInstance = repositorySponsorActivityInstance; _DaysInOfficeStrategy = daysInOfficeStrategy; }
public PresidentService( IRepository <Person> personRepositoryInstance, IValidatorStrategy <President> validator, IDaysInOfficeStrategy daysInOfficeStrategy) { if (personRepositoryInstance == null) { throw new ArgumentNullException("personRepositoryInstance", "personRepositoryInstance is null."); } if (validator == null) { throw new ArgumentNullException("validator", "Argument cannot be null."); } _RepositoryInstance = personRepositoryInstance; _ValidatorInstance = validator; _Adapter = new PersonToPresidentAdapter(); _DaysInOfficeStrategy = daysInOfficeStrategy; }