Exemple #1
0
            public new static T End(IAsyncResult result)
            {
                if (!(result is TypedCompletedAsyncResult <T> completedResult))
                {
                    throw new ArgumentException("InvalidAsyncResult");
                }

                return(TypedAsyncResult <T> .End(completedResult));
            }
            public static ArraySegment <byte> End(IAsyncResult result, ref EndPoint remoteEndPoint)
            {
                ArraySegment <byte> data = TypedAsyncResult <ArraySegment <byte> > .End(result);

                ReceiveFromAsyncResult receiveFromResult = (ReceiveFromAsyncResult)result;

                remoteEndPoint = receiveFromResult.RemoteEndPoint;
                return(data);
            }
Exemple #3
0
    public new static T End(IAsyncResult result)
    {
        TypedCompletedAsyncResult <T> completedResult = result as TypedCompletedAsyncResult <T>;

        if (completedResult == null)
        {
            throw new ArgumentException("Invalid async result.", "result");
        }

        return(TypedAsyncResult <T> .End(completedResult));
    }
Exemple #4
0
 public string[][] EndExecuteQuery(IAsyncResult result)
 {
     return(TypedAsyncResult <string[][]> .End(result));
 }