共用方式為


MessagePropertyFilter.UseJournalQueue 屬性

定義

取得或設定值,指出在接收或窺視訊息時是否要擷取 UseJournalQueue 屬性資訊。

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

屬性值

true 表示接收 UseJournalQueue 資訊,否則為 false。 預設為 true

屬性

範例

下列程式代碼範例示範 屬性的使用 UseJournalQueue

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

備註

類別 UseJournalQueueMessage 屬性會指定訊息的複本是否應該保留在原始電腦上的計算機日誌中。

適用於

另請參閱