public Message ReceiveMessage(Microsoft.ServiceBus.Channels.IConnection connection, TimeSpan timeout) { SocketMessageHelper.ReceiveMessageAsyncResult receiveMessageAsyncResult = new SocketMessageHelper.ReceiveMessageAsyncResult(this, connection, timeout, null, null); receiveMessageAsyncResult.RunSynchronously(); return(receiveMessageAsyncResult.Message); }
public IAsyncResult BeginReceiveMessage(Microsoft.ServiceBus.Channels.IConnection connection, TimeSpan timeout, AsyncCallback callback, object state) { SocketMessageHelper.ReceiveMessageAsyncResult receiveMessageAsyncResult = new SocketMessageHelper.ReceiveMessageAsyncResult(this, connection, timeout, callback, state); receiveMessageAsyncResult.Start(); return(receiveMessageAsyncResult); }