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); }
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)); }
public string[][] EndExecuteQuery(IAsyncResult result) { return(TypedAsyncResult <string[][]> .End(result)); }