MessagePropertyFilter.SourceMachine Vlastnost

Definice

Získá nebo nastaví hodnotu, která určuje, zda se mají načíst SourceMachine informace o vlastnosti při příjmu nebo náhledu zprávy.

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

Hodnota vlastnosti

truepro příjem SourceMachine informací, jinak . false Výchozí formát je false.

Atributy

Příklady

Následující příklad kódu ukazuje použití SourceMachine vlastnosti .

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

Poznámky

Vlastnost SourceMachineMessage třídy určuje počítač, ze kterého zpráva pochází.

Platí pro

Viz také