TypeDescriptionProvider.GetExtendedTypeDescriptor(Object) 方法

定義

取得特定物件的擴充自訂型別描述項。

public:
 virtual System::ComponentModel::ICustomTypeDescriptor ^ GetExtendedTypeDescriptor(System::Object ^ instance);
public virtual System.ComponentModel.ICustomTypeDescriptor GetExtendedTypeDescriptor (object instance);
abstract member GetExtendedTypeDescriptor : obj -> System.ComponentModel.ICustomTypeDescriptor
override this.GetExtendedTypeDescriptor : obj -> System.ComponentModel.ICustomTypeDescriptor
Public Overridable Function GetExtendedTypeDescriptor (instance As Object) As ICustomTypeDescriptor

參數

instance
Object

要為其取得擴充型別描述項的物件。

傳回

ICustomTypeDescriptor,可以提供物件的擴充中繼資料。

備註

擴充型別描述項是自定義型別描述項,可提供其他物件已新增至此對象的屬性,但未實際定義於物件上。 例如,在 .NET Framework元件模型中,實IExtenderProvider作 介面的物件可以將屬性附加至位於相同邏輯容器中的其他物件。 多載 GetTypeDescriptor 方法不會傳回提供這些額外擴充屬性的類型描述項。 方法會 GetExtendedTypeDescriptor 傳回這些擴充屬性的集合。 TypeDescriptor會自動合併這兩個屬性集合的結果。 雖然 .NET Framework元件模型只支援擴充屬性,GetExtendedTypeDescriptor但如果類型描述提供者支援擴充屬性,則可以用於擴充屬性和事件。

GetExtendedTypeDescriptorvirtual ,而且根據預設,會傳回自定義類型描述項,如果未傳遞任何父提供者,則會傳回空的結果。 如果傳遞父提供者,這個方法會叫用父提供者的 GetExtendedTypeDescriptor 方法。

適用於

另請參閱