MessagePropertyFilter.AttachSenderId Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Recebe ou define um valor que indica se deve recuperar AttachSenderId informação de propriedade ao receber ou espreitar uma mensagem.
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 Propriedade
true para receber AttachSenderId informação; caso contrário, false. A predefinição é false.
- Atributos
Exemplos
O seguinte exemplo de código demonstra a utilização da AttachSenderId propriedade.
// 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);
Observações
A AttachSenderId propriedade da Message classe especifica se o Message.SenderId deve ser ou foi anexado à mensagem. A Message.SenderId Linha é definida pela Fila de Mensagens e é usada pelo Gestor de Filas recetor para verificar se o remetente tem direitos de acesso a uma fila.