Пример #1
0
        private static Task <Task> WhenAny(Collections.Generic.IList <Task> tasks)
        {
            CheckForNullTasks(tasks);
            if (tasks.Count == 0)
            {
                throw  new ArgumentException("tasks");
            }

            var task = new TaskCompletionSource <Task>();

            new WhenAnyContinuation(task, tasks);
            return(task.Task);
        }
Пример #2
0
        private static Task WhenAll(Collections.Generic.IList <Task> tasks)
        {
            CheckForNullTasks(tasks);
            if (tasks.Count == 0)
            {
                return(CompletedTask);
            }

            var task = new TaskCompletionSource <object>();

            new WhenAllContinuation(task, tasks);
            return(task.Task);
        }
Пример #3
0
 public IAsyncResult BeginSend(Collections.Generic.IList <ArraySegment <byte> > buffers, SocketFlags socketFlags, out SocketError errorCode, AsyncCallback callback, object state)
 {
     throw null;
 }
Пример #4
0
 public IAsyncResult BeginReceive(Collections.Generic.IList <ArraySegment <byte> > buffers, SocketFlags socketFlags, AsyncCallback callback, object state)
 {
     throw null;
 }
Пример #5
0
 public IAsyncResult BeginSend(Collections.Generic.IList <ArraySegment <byte> > buffers, SocketFlags socketFlags, out SocketError errorCode, AsyncCallback callback, object state)
 {
     errorCode = default(SocketError); return(default(IAsyncResult));
 }
Пример #6
0
 public IAsyncResult BeginReceive(Collections.Generic.IList <ArraySegment <byte> > buffers, SocketFlags socketFlags, AsyncCallback callback, object state)
 {
     return(default(IAsyncResult));
 }