static void BindLifetimes(IChannelFactory factory, IChannel channel) { channel.Closed += delegate { IAsyncResult result = factory.BeginClose(FactoryCloseCallback, factory); if (result.CompletedSynchronously) { factory.EndClose(result); } }; }
protected override IAsyncResult OnBeginClose(TimeSpan timeout, AsyncCallback callback, object state) { return(inner.BeginClose(timeout, callback, state)); }
public IAsyncResult BeginClose(AsyncCallback callback, object state) { return(_innerChannelFactory.BeginClose(callback, state)); }