MessagePropertyFilter.SourceMachine Eigenschap

Definitie

Hiermee wordt een waarde opgehaald of ingesteld die aangeeft of eigenschapsgegevens moeten worden opgehaald SourceMachine bij het ontvangen of bekijken van een bericht.

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

Waarde van eigenschap

trueom informatie te ontvangenSourceMachine; anders. false De standaardwaarde is false.

Kenmerken

Voorbeelden

In het volgende codevoorbeeld ziet u hoe de SourceMachine eigenschap wordt gebruikt.

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

Opmerkingen

De SourceMachine eigenschap van de Message klasse geeft de computer aan waarvan het bericht afkomstig is.

Van toepassing op

Zie ook