Nyelv

MessagePropertyFilter.SourceMachine Tulajdonság

Definíció

Lekéri vagy beállít egy értéket, amely jelzi, hogy az üzenet fogadásakor vagy betekintésekor meg szeretné-e kérni SourceMachine a tulajdonságadatokat.

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

Tulajdonság értéke

trueinformációk fogadásáhozSourceMachine; ellenkező esetben. false Az alapértelmezett érték a false.

Attribútumok

Példák

Az alábbi példakód bemutatja a SourceMachine tulajdonság használatát.

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

Megjegyzések

Az SourceMachine osztály tulajdonsága Message határozza meg azt a számítógépet, ahonnan az üzenet származik.

A következőre érvényes:

Lásd még