共用方式為


MessagePropertyFilter.ArrivedTime 屬性

定義

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

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

屬性值

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

屬性

範例

下列程式代碼範例示範 如何使用 ArrivedTime 屬性。

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

備註

類別 ArrivedTimeMessage 屬性會指出訊息抵達目的地佇列的時間。 這是從 GMT 調整為擷取訊息之電腦的當地時間。

適用於

另請參閱