MessagePropertyFilter.AttachSenderId Свойство
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Возвращает или задает значение, указывающее, следует ли получать AttachSenderId сведения о свойстве при получении или просмотре сообщения.
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
Значение свойства
trueЗначение , falseчтобы получить AttachSenderId сведения; в противном случае . Значение по умолчанию — false.
- Атрибуты
Примеры
В следующем примере кода показано использование 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);
// 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);
Комментарии
Свойство AttachSenderIdMessage класса указывает, должно ли Message.SenderId быть или присоединено к сообщению. Задается Message.SenderId очередью сообщений и используется получателем диспетчера очередей, чтобы проверить, имеет ли отправитель права доступа к очереди.