IExtension<T> 介面

定義

讓物件可以透過彙總 (Aggregation) 擴充另一個物件。

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

類型參數

T

參與自訂行為的物件。

衍生

備註

WCF 可讓您藉由使用其可延伸的物件模式,將物件 (System.ServiceModel.IExtensibleObject<T>System.ServiceModel.IContextChannelSystem.ServiceModel.ServiceHost 、、 System.ServiceModel.InstanceContextSystem.ServiceModel.OperationContext 類別) 。 WCF 中使用可延伸物件模式,以擴充具有新功能的現有執行時間類別,或將新的狀態功能新增至 物件。

方法

Attach(T)

讓擴充物件可以找出它被彚總的時間。 當擴充加入至 Extensions 屬性時呼叫。

Detach(T)

讓擴充物件可以找出它不再被彚總的時間。 當擴充從 Extensions 屬性中移除時呼叫。

適用於