// todo: refactor all methods it this class by the some html template // todo: refactor when id will be added to cookies to reduce database requests public GlobalEventsHandler(IGlobalEventsAggregator eventsAggregator, INotificationsEventManager notyEventManager) { _eventsAggregator = eventsAggregator; _notyEventManager = notyEventManager; //subscribe to events _eventsAggregator.CommentAdded += PhotoCommentAddedCaused; _eventsAggregator.PhotoAdded += PhotoAddedCaused; _eventsAggregator.LikeToPhotoAdded += LikeToPhotoAddedCaused; _eventsAggregator.SomeoneRepliedToComment += SomeoneRepliedToCommentCaused; }
public PhotoService(IUnitOfWorkFactory workFactory, ISecureService secureService, IGlobalEventsAggregator eventsAggregator) : base(workFactory) { _secureService = secureService; _eventsAggregator = eventsAggregator; }
public PhotoCommentService(IUnitOfWorkFactory workFactory, ISecureService secureService, IGlobalEventsAggregator eventsAggregator) : base(workFactory) { this.secureService = secureService; this.eventsAggregator = eventsAggregator; }