public async Task AddTaskAsync(Action task)
 {
     if (task != null)
     {
         CustomTaskAsyncServerCall serverCall = new CustomTaskAsyncServerCall(this, task);
         ServerCallTask.Task.Add(serverCall);
         await serverCall;
     }
 }
Esempio n. 2
0
 public async Task AddTaskAsync(Action task, TcpServer.ServerTaskType taskType, byte callQueueIndex = 0)
 {
     if (task != null)
     {
         CustomTaskAsyncServerCall serverCall = new CustomTaskAsyncServerCall(this, task);
         if (addTask(serverCall, taskType, callQueueIndex))
         {
             await serverCall;
         }
     }
 }