Exemplo n.º 1
0
 /// <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
            ));
 }
Exemplo n.º 3
0
 public AnnouncementsController(IAnnouncementValidator announcementValidator)
 {
     this.announcementValidator = announcementValidator;
 }
Exemplo n.º 4
0
 public AnnouncementsController()
 {
     announcementValidator = SystemFactory.GetAnnouncementValidatorInstance();
 }