IExtensibleObject<T> 介面

定義

讓物件參與自訂行為 (如註冊事件),或監控狀態轉換。

generic <typename T>
 where T : IExtensibleObject<T>public interface class IExtensibleObject
public interface IExtensibleObject<T> where T : IExtensibleObject<T>
type IExtensibleObject<'T (requires 'T :> IExtensibleObject<'T>)> = interface
Public Interface IExtensibleObject(Of T)

類型參數

T

擴充功能類別的型別。

衍生

備註

實作 IExtensibleObject<T> 以啟用擴充功能彙總。

例如,如果您實作 TreeNode 類別,且想讓外部程式碼在某些 TreeNode 執行個體上新增附註與方法,您可以讓 TreeNode 實作 IExtensibleObject<TreeNode>。 這可讓使用 TreeNode 的程式碼將實作 IExtensibleObject<TreeNode> 的物件新增至 Extensions 集合。

Windows Communication Foundation (WCF) 中有四個可延伸物件:

如需如何建立延伸模組以使用這些物件的討論,請參閱 可延伸物件

屬性

Extensions

取得這個可擴充物件的擴充功能物件集合。

適用於