예제 #1
0
파일: Task.cs 프로젝트: luozhiping1987/api
        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
파일: Task.cs 프로젝트: luozhiping1987/api
        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));
 }