コード例 #1
0
ファイル: GroupSet.cs プロジェクト: HuZeHua/InternetDemo
 public void Handle(GroupUpdatedEvent message)
 {
     if (message.IsPrivate)
     {
         return;
     }
     this.Handle(message.AcSession, message.Output, false);
 }
コード例 #2
0
ファイル: Medium.cs プロジェクト: Profilan/EyeBoard
        public virtual void DeleteGroup(ScreenGroup group)
        {
            var groupToDelete = this.Groups.Where(a => a.Id == group.Id);

            if (groupToDelete != null)
            {
                TrackingState = TrackingState.Deleted;
                Groups.Remove(group);

                var groupUpdatedEvent = new GroupUpdatedEvent(group);
                DomainEvents.Raise(groupUpdatedEvent);
            }
        }
コード例 #3
0
ファイル: Medium.cs プロジェクト: Profilan/EyeBoard
        public virtual ScreenGroup AddNewGroup(ScreenGroup group)
        {
            if (Groups.Any(a => a.Id == group.Id))
            {
                throw new ArgumentException("Cannot add duplicate group to medium.", "group");
            }

            TrackingState = TrackingState.Added;
            Groups.Add(group);

            var groupUpdatedEvent = new GroupUpdatedEvent(group);

            DomainEvents.Raise(groupUpdatedEvent);

            return(group);
        }
コード例 #4
0
        public virtual void DeletePresentation(Medium presentation)
        {
            // mark the presentation for deletion by the repository
            var presentationToDelete = this.Media.Where(a => a.Id == presentation.Id).FirstOrDefault();

            if (presentationToDelete != null)
            {
                presentationToDelete.TrackingState = TrackingState.Deleted;
                Media.Remove(presentation);

                var groupUpdatedEvent = new GroupUpdatedEvent(this);
                DomainEvents.Raise(groupUpdatedEvent);
            }

            // MarkConflictingAppointments();
        }
コード例 #5
0
        public virtual void DeleteNotification(Notification notification)
        {
            // mark the presentation for deletion by the repository
            var notificationToDelete = this.Notifications.Where(a => a.Id == notification.Id).FirstOrDefault();

            if (notificationToDelete != null)
            {
                notificationToDelete.TrackingState = TrackingState.Deleted;
                Notifications.Remove(notification);

                var groupUpdatedEvent = new GroupUpdatedEvent(this);
                DomainEvents.Raise(groupUpdatedEvent);
            }

            // MarkConflictingAppointments();
        }
コード例 #6
0
        public virtual Medium AddNewPresentation(Medium presentation)
        {
            if (Media.Any(a => a.Id == presentation.Id))
            {
                throw new ArgumentException("Cannot add duplicate presentation to group.", "presentation");
            }

            presentation.TrackingState = TrackingState.Added;
            Media.Add(presentation);

            // MarkConflictingAppointments();

            var groupUpdatedEvent = new GroupUpdatedEvent(this);

            DomainEvents.Raise(groupUpdatedEvent);

            return(presentation);
        }
コード例 #7
0
        public virtual Notification AddNewNotification(Notification notification)
        {
            if (Notifications.Any(a => a.Id == notification.Id))
            {
                throw new ArgumentException("Cannot add duplicate notification to group.", "notification");
            }

            notification.TrackingState = TrackingState.Added;
            Notifications.Add(notification);

            // MarkConflictingAppointments();

            var groupUpdatedEvent = new GroupUpdatedEvent(this);

            DomainEvents.Raise(groupUpdatedEvent);

            return(notification);
        }
コード例 #8
0
 public virtual void Handle(GroupUpdatedEvent args)
 {
     // MarkConflictingAppointments();
 }