OperationBehaviorAttribute.AutoDisposeParameters 屬性

定義

取得或設定值,指出是否會自動處置參數。

public:
 property bool AutoDisposeParameters { bool get(); void set(bool value); };
public bool AutoDisposeParameters { get; set; }
member this.AutoDisposeParameters : bool with get, set
Public Property AutoDisposeParameters As Boolean

屬性值

Boolean

true 如果要自動處置參數,則為 ;否則為 false

備註

這個屬性會決定服務是否會在處理訊息時處置已建立的所有可處置參數 (輸入、輸出或參考參數)。 預設值是 true。 如果要防止系統處置資源並於必要時進行快取,請將這個屬性設定為 false

例如,如果 AutoDisposeParametersfalse,傳送者就會負責關閉傳送端的資料流。

適用於