MessagePropertyFilter.AttachSenderId Propriedade
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Obtém ou define um valor que indica se as informações da propriedade devem ser recuperadas AttachSenderId ao receber ou espiar 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 da propriedade
true para receber AttachSenderId informações; caso contrário, false. O padrão é false.
- Atributos
Exemplos
O exemplo de código a seguir demonstra o uso 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);
Comentários
A AttachSenderId propriedade da Message classe especifica se o Message.SenderId deve ser ou se foi anexado à mensagem. A Message.SenderId origem é definida pelo Enfileiramento de Mensagens e é usada pelo Gerenciador de Filas receptora para verificar se o remetente tem direitos de acesso a uma fila.