您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

MessageSession.OnTryReceive Method

Definition

Overloads

OnTryReceive(TrackingContext, IEnumerable<Int64>, TimeSpan, IEnumerable<BrokeredMessage>)

Executes the try receive action.

OnTryReceive(TrackingContext, Int32, TimeSpan, IEnumerable<BrokeredMessage>)

Executes the try receive action.

OnTryReceive(TrackingContext, IEnumerable<Int64>, TimeSpan, IEnumerable<BrokeredMessage>)

Executes the try receive action.

protected override bool OnTryReceive (Microsoft.ServiceBus.Tracing.TrackingContext trackingContext, System.Collections.Generic.IEnumerable<long> receipts, TimeSpan timeout, out System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.BrokeredMessage> messages);
Parameters
trackingContext
TrackingContext

TrackingContext to use.

receipts
IEnumerable<Int64>

The receipts.

timeout
TimeSpan

The timeout.

messages
IEnumerable<BrokeredMessage>

the output message (out)

Returns

OnTryReceive(TrackingContext, Int32, TimeSpan, IEnumerable<BrokeredMessage>)

Executes the try receive action.

protected override bool OnTryReceive (Microsoft.ServiceBus.Tracing.TrackingContext trackingContext, int messageCount, TimeSpan serverWaitTime, out System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.BrokeredMessage> messages);
Parameters
trackingContext
TrackingContext

TrackingContext to use.

messageCount
Int32

The number of messages.

serverWaitTime
TimeSpan

The server wait time before it times out.

messages
IEnumerable<BrokeredMessage>

returned messages.

Returns

Applies to