예제 #1
0
 public void OnStatusUpdated(ITaskStatusUpdatedMessage message)
 {
     if (message.AssignedUserId.HasValue)
     {
         if (message.Status == TaskStatus.Removed)
         {
             _userTasksDataAccessor.RemoveTask(message.AssignedUserId.Value, message.TaskId);
         }
         else
         {
             _userTasksDataAccessor.ChangeTaskStatus(message.AssignedUserId.Value, message.TaskId, message.Status);
         }
     }
 }
예제 #2
0
        public void OnStatusUpdated(ITaskStatusUpdatedMessage message)
        {
            var connectionIds = _storage.Get(message.ProjectId, message.CreatorId);

            switch (message.Status)
            {
            case TaskStatus.Completed:
                _tasksHubClient.SendAsync("TASK_COMPLETED", message.TaskId, connectionIds);
                break;

            case TaskStatus.Removed:
                _tasksHubClient.SendAsync("TASK_DELETED", message.TaskId, connectionIds);
                break;
            }
        }