MessagePropertyFilter.AttachSenderId Propiedad

Definición

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

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

Valor de propiedad

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

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

Comentarios

La AttachSenderId propiedad de la Message clase especifica si Message.SenderId debe ser o se ha adjuntado al mensaje. Message Message.SenderId Queuing establece y lo usa el Administrador de colas receptora para comprobar si el remitente tiene derechos de acceso a una cola.

Se aplica a

Consulte también