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 不支持泛型类型或方法。
类型参数
- TInterfaceType
一个从 IExtension 继承的 Type。
返回值
类型:Microsoft.Data.Schema.Extensibility.ExtensionHandle<TInterfaceType>
一个 ExtensionHandle<TInterfaceType>。
异常
异常 | 条件 |
---|---|
ExtensibilityException | ExtensionCriteriaAttribute 的 AllowMultipleExtensions 属性为 false,且发现了多个匹配的扩展。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。