Aracılığıyla paylaş


MessagePropertyFilter.IsFirstInTransaction Özellik

Tanım

İletiyi alırken veya göz atırken özellik bilgilerinin alınıp alınmayacağını IsFirstInTransaction belirten bir değer alır veya ayarlar.

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

Özellik Değeri

true bilgi almak IsFirstInTransaction için; aksi takdirde , false. Varsayılan değer: false.

Öznitelikler

Örnekler

Aşağıdaki kod örneği özelliğinin IsFirstInTransaction kullanımını gösterir.

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's IsFirstInTransaction property.
queue->MessageReadPropertyFilter->
    IsFirstInTransaction = 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 
// IsFirstInTransaction property.
Console::WriteLine("Message.IsFirstInTransaction: {0}", 
    orderMessage->IsFirstInTransaction);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's IsFirstInTransaction property.
queue.MessageReadPropertyFilter.IsFirstInTransaction = 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 IsFirstInTransaction property.
Console.WriteLine("Message.IsFirstInTransaction: {0}",
    orderMessage.IsFirstInTransaction);

Açıklamalar

IsFirstInTransaction sınıfının özelliği, bir iletinin Message tek bir işlemde tek bir kuyruğa gönderilen ilk ileti olup olmadığını doğrulamak için uygulamalar tarafından kullanılır.

Şunlara uygulanır

Ayrıca bkz.