MessagePropertyFilter.AttachSenderId Vlastnost
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Získá nebo nastaví hodnotu, která určuje, zda se mají načíst AttachSenderId informace o vlastnosti při přijetí nebo náhledu zprávy.
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
Hodnota vlastnosti
true
AttachSenderId přijímat informace, jinak . false Výchozí hodnota je false.
- Atributy
Příklady
Následující příklad kódu ukazuje použití AttachSenderId vlastnosti.
// 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);
Poznámky
Vlastnost AttachSenderIdMessage třídy určuje, zda Message.SenderId má být nebo byl připojen ke zprávě. Je Message.SenderId nastavena službou Řízení front zpráv a používá ji přijímající správce front k ověření, zda má odesílatel přístupová práva k frontě.