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); }
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); }
public IAsyncResult BeginSend(Collections.Generic.IList <ArraySegment <byte> > buffers, SocketFlags socketFlags, out SocketError errorCode, AsyncCallback callback, object state) { throw null; }
public IAsyncResult BeginReceive(Collections.Generic.IList <ArraySegment <byte> > buffers, SocketFlags socketFlags, AsyncCallback callback, object state) { throw null; }
public IAsyncResult BeginSend(Collections.Generic.IList <ArraySegment <byte> > buffers, SocketFlags socketFlags, out SocketError errorCode, AsyncCallback callback, object state) { errorCode = default(SocketError); return(default(IAsyncResult)); }
public IAsyncResult BeginReceive(Collections.Generic.IList <ArraySegment <byte> > buffers, SocketFlags socketFlags, AsyncCallback callback, object state) { return(default(IAsyncResult)); }