ContextMessageProperty.TryGet 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
嘗試從指定的訊息或訊息屬性集合中取得 。ContextMessageProperty
多載
| 名稱 | Description |
|---|---|
| TryGet(Message, ContextMessageProperty) |
嘗試從指定訊息的屬性中取得 。 |
| TryGet(MessageProperties, ContextMessageProperty) |
嘗試從指定的訊息屬性集合中取得 。 |
TryGet(Message, ContextMessageProperty)
嘗試從指定訊息的屬性中取得 。ContextMessageProperty
public:
static bool TryGet(System::ServiceModel::Channels::Message ^ message, [Runtime::InteropServices::Out] System::ServiceModel::Channels::ContextMessageProperty ^ % contextMessageProperty);
public static bool TryGet(System.ServiceModel.Channels.Message message, out System.ServiceModel.Channels.ContextMessageProperty contextMessageProperty);
static member TryGet : System.ServiceModel.Channels.Message * ContextMessageProperty -> bool
Public Shared Function TryGet (message As Message, ByRef contextMessageProperty As ContextMessageProperty) As Boolean
參數
- contextMessageProperty
- ContextMessageProperty
當此方法返回 true時, contextMessageProperty 包含 ContextMessageProperty 包含 ContextMessageProperty 的 ,且 與 相關聯 message。 這個參數會未初始化傳遞。
傳回
true當 從 ContextMessageProperty得到 的值message時;否則, false。
適用於
TryGet(MessageProperties, ContextMessageProperty)
嘗試從指定的訊息屬性集合中取得 。ContextMessageProperty
public:
static bool TryGet(System::ServiceModel::Channels::MessageProperties ^ properties, [Runtime::InteropServices::Out] System::ServiceModel::Channels::ContextMessageProperty ^ % contextMessageProperty);
public static bool TryGet(System.ServiceModel.Channels.MessageProperties properties, out System.ServiceModel.Channels.ContextMessageProperty contextMessageProperty);
static member TryGet : System.ServiceModel.Channels.MessageProperties * ContextMessageProperty -> bool
Public Shared Function TryGet (properties As MessageProperties, ByRef contextMessageProperty As ContextMessageProperty) As Boolean
參數
- properties
- MessageProperties
要從中 MessageProperties 擷取上下文訊息屬性。
- contextMessageProperty
- ContextMessageProperty
當此方法返回 true時, contextMessageProperty 包含 ContextMessageProperty 包含 ContextMessageProperty 的 ,且 與 相關聯 properties。 這個參數會未初始化傳遞。
傳回
true當 從 ContextMessageProperty得到 的值properties時;否則, false。