protected override bool OnTryReceive(TimeSpan timeout, out BrokeredMessage brokeredMessage) { ServiceBusInputSessionChannel.TryReceiveAsyncResult tryReceiveAsyncResult = new ServiceBusInputSessionChannel.TryReceiveAsyncResult(this, timeout, null, null); tryReceiveAsyncResult.RunSynchronously(); brokeredMessage = tryReceiveAsyncResult.BrokeredMessage; return(tryReceiveAsyncResult.ReturnValue); }
protected override bool OnEndTryReceive(IAsyncResult result, out BrokeredMessage brokeredMessage) { ServiceBusInputSessionChannel.TryReceiveAsyncResult tryReceiveAsyncResult = AsyncResult <ServiceBusInputSessionChannel.TryReceiveAsyncResult> .End(result); brokeredMessage = tryReceiveAsyncResult.BrokeredMessage; return(tryReceiveAsyncResult.ReturnValue); }