public RssController(ICourseService courseService, IYearService yearService, ICourseMenuService menuService, IContentManager contentManager, IRepository<PostRecord> postRepo) { this.contentManager = contentManager; this.yearService = yearService; this.courseService = courseService; this.menuService = menuService; this.postRepo = postRepo; }
public CourseMenuController(IContentManager contentManager, IShapeFactory shapeFactory, IRepository<MailSubscriptionRecord> subscriptionRepo, IRepository<PostRecord> postRepo, ICourseService courseService, IYearService yearService, ICourseMenuService menuService, IAuthenticationService authenticationService) { this.Shape = shapeFactory; this.contentManager = contentManager; this.subscriptionRepo = subscriptionRepo; this.postRepo = postRepo; this.yearService = yearService; this.courseService = courseService; this.menuService = menuService; this.authenticationService = authenticationService; T = NullLocalizer.Instance; }
public PostHandler(ICourseMenuService menuService, IYearService yearService, ICourseService courseService, IRepository<MailSubscriptionRecord> mailRepo, IMembershipService membershipService, IMessageManager messageManager, IRepository<PostRecord> postRepo, IHttpContextAccessor httpContextAccessor) { this.courseService = courseService; this.yearService = yearService; this.menuService = menuService; this.httpContextAccessor = httpContextAccessor; this.postRepo = postRepo; this.mailRepo = mailRepo; this.messageManager = messageManager; this.membershipService = membershipService; OnPublished<RoutePart>((context, part) => { var item = postRepo.Fetch(x => x.ContentId == part.ContentItem.Id).FirstOrDefault(); if (item != null) { var menu = menuService.Get(item.Menu.Id); sendEmail(menu.Id, part.ContentItem); } }); }