protected override bool EndTryCommand(IAsyncResult result) { StructuredTracer.Correlate(); TypedCompletedAsyncResult <Exception> exceptionResult = result as TypedCompletedAsyncResult <Exception>; if (exceptionResult != null) { throw exceptionResult.Data; } return(TypedCompletedAsyncResult <bool> .End(result)); }
public static T End(IAsyncResult result) { TypedCompletedAsyncResult <T> typedCompletedAsyncResult = result as TypedCompletedAsyncResult <T>; if (typedCompletedAsyncResult != null) { return(TypedAsyncResult <T> .End(typedCompletedAsyncResult)); } else { throw new ArgumentException(Resources.InvalidAsyncResult); } }