MessagePropertyFilter.IsLastInTransaction Свойство

Определение

Получает или задает значение, указывающее, следует ли извлекать сведения свойства IsLastInTransaction при получении или считывании сообщения.

public:
 property bool IsLastInTransaction { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgIsLastInTransaction")]
public bool IsLastInTransaction { get; set; }
[<System.Messaging.MessagingDescription("MsgIsLastInTransaction")>]
member this.IsLastInTransaction : bool with get, set
Public Property IsLastInTransaction As Boolean

Значение свойства

Значение true означает получение сведений IsLastInTransaction, в противном случае — значение false. Значение по умолчанию — false.

Атрибуты

Примеры

В следующем примере кода демонстрируется использование IsLastInTransaction свойство.

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's IsLastInTransaction property.
queue->MessageReadPropertyFilter->
    IsLastInTransaction = true;

// Peek at the message. Time out after ten seconds 
// in case the message was not delivered.
orderMessage = queue->Peek(TimeSpan::FromSeconds(10.0));

// Display the value of the message's 
// IsLastInTransaction property.
Console::WriteLine("Message.IsLastInTransaction: {0}", 
    orderMessage->IsLastInTransaction);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's IsLastInTransaction property.
queue.MessageReadPropertyFilter.IsLastInTransaction = true;

// Peek at the message. Time out after ten seconds in case the message
// was not delivered.
orderMessage = queue.Peek(TimeSpan.FromSeconds(10.0));

// Display the value of the message's IsLastInTransaction property.
Console.WriteLine("Message.IsLastInTransaction: {0}",
    orderMessage.IsLastInTransaction);

Комментарии

Свойство IsLastInTransactionMessage класса используется при получении приложений для проверки того, является ли сообщение последним сообщением, отправленным из одной транзакции в одну очередь.

Применяется к

См. также раздел