MessagePropertyFilter.SenderId Propiedad

Definición

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

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

Valor de propiedad

true para recibir información de SenderId; 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 SenderId propiedad .

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

Comentarios

El SenderId administrador de colas receptor usa principalmente la propiedad de la Message clase al autenticar un mensaje. Message Queuing establece la propiedad y la usa el administrador de colas para comprobar quién envió el mensaje y que el remitente tiene derechos de acceso a la cola receptora.

Se aplica a

Consulte también