MessagePropertyFilter.Extension Property
.NET Framework 3.0
Gets or sets a value that indicates whether to retrieve Message.Extension property information when receiving or peeking a message.
Namespace: System.Messaging
Assembly: System.Messaging (in system.messaging.dll)
Assembly: System.Messaging (in system.messaging.dll)
/** @property */ public boolean get_Extension () /** @property */ public void set_Extension (boolean value)
public function get Extension () : boolean public function set Extension (value : boolean)
Not applicable.
Property Value
true to receive Message.Extension information; otherwise, false. The default is false.The Extension property of the Message class provides for additional application-defined information that is associated with the message, like a large binary object. It is the responsibility of the receiving application to interpret the contents of the Extension.
The following code example demonstrates the use of the Extension property.
// Set the queue's MessageReadPropertyFilter property to enable the // message's Extension property. queue.MessageReadPropertyFilter.Extension = 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 Extension property. Console.WriteLine("Message.Extension: {0}", orderMessage.Extension);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's Extension property.
queue.get_MessageReadPropertyFilter().set_Extension(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 Extension property.
Console.WriteLine("Message.Extension: {0}",
System.Convert.ToString(orderMessage.get_Extension()));
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.