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
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.