Allors.Domain.CommunicationTask.ManageNotification C# (CSharp) Method

ManageNotification() public method

public ManageNotification ( Allors.Domain.TaskAssignment taskAssignment ) : void
taskAssignment Allors.Domain.TaskAssignment
return void
        public void ManageNotification(TaskAssignment taskAssignment)
        {
            if (!taskAssignment.ExistNotification && this.CommunicationEvent.SendNotification == true && this.CommunicationEvent.RemindAt < this.Strategy.Session.Now())
            {
                var notification = new NotificationBuilder(this.Strategy.Session)
                    .WithTitle("CommunicationEvent: " + this.WorkItem.WorkItemDescription)
                    .WithDescription("CommunicationEvent: " + this.WorkItem.WorkItemDescription)
                    .WithTarget(this)
                    .Build();

                taskAssignment.Notification = notification;
                taskAssignment.User.NotificationList.AddNotification(notification);
            }
        }
    }