public static WaitForComplete ( IAsyncResult ar ) : void | ||
ar | IAsyncResult | The result object returned from the Begin method. |
return | void |
public static void WaitForComplete(IAsyncResult ar)
{
AsyncResultBase result = ar as AsyncResultBase;
if (result == null)
{
throw new ArgumentException("IAsyncResult passed to call is not an instance of AsyncResultBase.");
}
if (!result.WaitForComplete())
{
throw new TimeoutException();
}
}
AsyncResultBase::WaitForComplete ( ) : bool |
/// <summary> /// Completes an asynchronous operation to close a communication object. /// </summary> public void EndClose(IAsyncResult result) { if (m_wcfBypassChannel != null) { m_wcfBypassChannel.EndClose(result); return; } AsyncResultBase.WaitForComplete(result); CloseChannel(); }