MustUnderstandBehavior 類別

定義

針對不在 UnderstoodHeaders 集合中的標頭,指示 Windows Communication Foundation (WCF) 停用其強制處理,該集合中的標頭必須根據 SOAP 1.1 和 1.2 規格解讀。

public ref class MustUnderstandBehavior : System::ServiceModel::Description::IEndpointBehavior
public class MustUnderstandBehavior : System.ServiceModel.Description.IEndpointBehavior
type MustUnderstandBehavior = class
    interface IEndpointBehavior
Public Class MustUnderstandBehavior
Implements IEndpointBehavior
繼承
MustUnderstandBehavior
實作

備註

根據預設,WCF 用戶端或服務執行時間會在屬性為 true 的訊息 MessageHeader.MustUnderstand 中遇到 System.ServiceModel.Channels.MessageHeader ,但標頭不在 MessageHeaders.UnderstoodHeaders 訊息的 屬性中時擲回例外狀況。

若要防止此行為,請使用 MustUnderstandBehavior 並將 ValidateMustUnderstand 屬性設定為 false。 一般來說,在訊息內容必須不經處理並轉送他處的案例中 (例如,路由器服務) 就會使用這種行為。

建構函式

MustUnderstandBehavior(Boolean)

使用指定的值初始化 MustUnderstandBehavior 類別的新執行個體。

屬性

ValidateMustUnderstand

取得或設定值,指定是否必須確保標頭可以根據 SOAP 1.1 和 1.2 規格解讀。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

明確介面實作

IEndpointBehavior.AddBindingParameters(ServiceEndpoint, BindingParameterCollection)

支援行為功能。

IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint, ClientRuntime)

ValidateMustUnderstand 的值指派給 ValidateMustUnderstand 屬性。

IEndpointBehavior.ApplyDispatchBehavior(ServiceEndpoint, EndpointDispatcher)

ValidateMustUnderstand 的值指派給 ValidateMustUnderstand 屬性。

IEndpointBehavior.Validate(ServiceEndpoint)

支援行為功能。

適用於