/// <summary>
        /// Adds the task to the list with connectionId id and cancellation token
        /// </summary>
        /// <param name="connectionId">The socket identifier.</param>
        /// <param name="token">The token.</param>
        public string AddTask(string connectionId, CancellationTokenSource token)
        {
            if (string.IsNullOrEmpty(connectionId) || token == null)
            {
                throw new ArgumentNullException(nameof(connectionId) + " or " + nameof(token));
            }
            var taskId = Guid.NewGuid().ToString();

            if (TaskList.ContainsKey(connectionId))
            {
                if (TaskList.TryGetValue(connectionId, out var set))
                {
                    set.Add(new WebSocketTask
                    {
                        CancellationTokenSource = token,
                        TaskId         = taskId,
                        ConnectionId   = connectionId,
                        TaskCompletion = new TaskCompletionSource <bool>()
                    });
                }
            }
            else
            {
                TaskList.TryAdd(connectionId,
                                new HashSet <WebSocketTask>
                {
                    new WebSocketTask
                    {
                        CancellationTokenSource = token,
                        TaskId         = taskId,
                        ConnectionId   = connectionId,
                        TaskCompletion = new TaskCompletionSource <bool>()
                    }
                });
            }
            return(taskId);
        }