MessagePropertyFilter.SourceMachine Propiedad

Definición

Obtiene o establece un valor que indica si se debe recuperar información de la propiedad SourceMachine al recibir un mensaje o leerlo.

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

Valor de propiedad

Boolean

true para recibir información de SourceMachine; en cualquier otro caso, false. De manera predeterminada, es false.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra el uso de la SourceMachine propiedad .

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

Comentarios

La SourceMachine propiedad de la Message clase especifica el equipo donde se originó el mensaje.

Se aplica a

Consulte también