Bagikan melalui


MessagePropertyFilter.IsFirstInTransaction Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah akan mengambil IsFirstInTransaction informasi properti saat menerima atau mengintip pesan.

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

Nilai Properti

true untuk menerima IsFirstInTransaction informasi; jika tidak, false. Default adalah false.

Atribut

Contoh

Contoh kode berikut menunjukkan penggunaan IsFirstInTransaction properti .

// 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);

Keterangan

Properti IsFirstInTransactionMessage kelas digunakan dengan menerima aplikasi untuk memverifikasi apakah pesan adalah pesan pertama yang dikirim dalam satu transaksi ke satu antrean.

Berlaku untuk

Lihat juga