共用方式為


ExtensionManager.GetSingleExtension<TInterfaceType> 方法

傳回單一 ExtensionHandle 物件。

命名空間:  Microsoft.Data.Schema.Extensibility
組件:  Microsoft.Data.Schema (在 Microsoft.Data.Schema.dll 中)

語法

'宣告
Public Function GetSingleExtension(Of TInterfaceType As {Class, IExtension}) As ExtensionHandle(Of TInterfaceType)
public ExtensionHandle<TInterfaceType> GetSingleExtension<TInterfaceType>()
where TInterfaceType : class, IExtension
public:
generic<typename TInterfaceType>
where TInterfaceType : ref class, IExtension
ExtensionHandle<TInterfaceType>^ GetSingleExtension()
member GetSingleExtension : unit -> ExtensionHandle<'TInterfaceType>  when 'TInterfaceType : not struct and IExtension
JScript 不支援泛型型別或方法。

型別參數

傳回值

型別:Microsoft.Data.Schema.Extensibility.ExtensionHandle<TInterfaceType>
ExtensionHandle<TInterfaceType>

例外狀況

例外狀況 條件
ExtensibilityException

ExtensionCriteriaAttributeAllowMultipleExtensions 屬性是 false,而且找到多個相符的副檔名。

.NET Framework 安全性

請參閱

參考

ExtensionManager 類別

Microsoft.Data.Schema.Extensibility 命名空間

ExtensionCriteriaAttribute

AllowMultipleExtensions

ExtensionHandle<TInterfaceType>