MessagePropertyFilter.SourceMachine Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether to retrieve SourceMachine property information when receiving or peeking a message.
public:
property bool SourceMachine { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgSourceMachine")]
public bool SourceMachine { get; set; }
[<System.Messaging.MessagingDescription("MsgSourceMachine")>]
member this.SourceMachine : bool with get, set
Public Property SourceMachine As Boolean
Property Value
true
to receive SourceMachine information; otherwise, false
. The default is false
.
- Attributes
Examples
The following code example demonstrates the use of the SourceMachine property.
// Set the queue's MessageReadPropertyFilter property
// to enable the message's SourceMachine property.
queue->MessageReadPropertyFilter->SourceMachine = 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
// SourceMachine property.
Console::WriteLine("Message.SourceMachine: {0}",
orderMessage->SourceMachine);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's SourceMachine property.
queue.MessageReadPropertyFilter.SourceMachine = 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 SourceMachine property.
Console.WriteLine("Message.SourceMachine: {0}",
orderMessage.SourceMachine);
Remarks
The SourceMachine property of the Message class specifies the computer where the message originated.
Applies to
See also
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.