Example #1
0
        // 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;
        }
Example #2
0
 public PhotoService(IUnitOfWorkFactory workFactory, ISecureService secureService, IGlobalEventsAggregator eventsAggregator) : base(workFactory)
 {
     _secureService    = secureService;
     _eventsAggregator = eventsAggregator;
 }
Example #3
0
 public PhotoCommentService(IUnitOfWorkFactory workFactory, ISecureService secureService, IGlobalEventsAggregator eventsAggregator) : base(workFactory)
 {
     this.secureService = secureService;
     this.eventsAggregator = eventsAggregator;
 }