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

            return(TypedAsyncResult <T> .End(completedResult));
        }
예제 #2
0
        public new static T End(IAsyncResult result)
        {
            TypedCompletedAsyncResult <T> completedResult = result as TypedCompletedAsyncResult <T>;

            if (completedResult == null)
            {
                throw new ArgumentException("InvalidAsyncResult");
            }

            return(TypedAsyncResult <T> .End(completedResult));
        }