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); } } }
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; } }