/// <summary> /// Constructor. /// </summary> public AnnouncementService( DatabaseContext dbContext, IAnnouncementValidator validator, IHtmlSanitizer htmlSanitizer, IEmailProvider emailProvider, ITimeProvider timeProvider) { _dbContext = dbContext; _validator = validator; _htmlSanitizer = htmlSanitizer; _emailProvider = emailProvider; _timeProvider = timeProvider; }
/// <summary> /// Returns a new announcement service. /// </summary> private AnnouncementService GetAnnouncementService( DatabaseContext dbContext, IAnnouncementValidator validator = null, IHtmlSanitizer htmlSanitizer = null, IEmailProvider emailProvider = null, ITimeProvider timeProvider = null) { return(new AnnouncementService ( dbContext, validator, htmlSanitizer, emailProvider, timeProvider )); }
public AnnouncementsController(IAnnouncementValidator announcementValidator) { this.announcementValidator = announcementValidator; }
public AnnouncementsController() { announcementValidator = SystemFactory.GetAnnouncementValidatorInstance(); }