Exemple #1
0
        public void RemoveTaskWithIdTest()
        {
            manager.AddConnection(connection.Object, testStr);

            var taskId = manager.AddTask(testStr, new CancellationTokenSource());

            manager.RemoveTaskWithId(taskId);
            Assert.Empty(manager.TaskList[testStr]);
        }
Exemple #2
0
 /// <summary>
 /// Stops the task with id for current connection.
 /// </summary>
 /// <param name="taskId">The task identifier.</param>
 public void StopTask(string taskId)
 {
     WebSocketManager.RemoveTaskWithId(taskId);
 }