MessagePropertyFilter.SourceMachine Proprietà

Definizione

Ottiene o imposta un valore che indica se recuperare le informazioni della proprietà SourceMachine quando si riceve o si visualizza un messaggio.

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

Valore della proprietà

Boolean

true per ricevere le informazioni di SourceMachine; false in caso contrario. Il valore predefinito è false.

Attributi

Esempio

Nell'esempio di codice seguente viene illustrato l'uso della SourceMachine proprietà .

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

Commenti

La SourceMachine proprietà della Message classe specifica il computer in cui è stato originato il messaggio.

Si applica a

Vedi anche