DatabaseSchemaProvider.GetServiceConstructor<TServiceConstructor> 方法
返回所提供的 Type 标识的服务的构造函数。
命名空间: Microsoft.Data.Schema
程序集: Microsoft.Data.Schema(在 Microsoft.Data.Schema.dll 中)
语法
声明
Public Function GetServiceConstructor(Of TServiceConstructor As ServiceConstructor) As TServiceConstructor
public TServiceConstructor GetServiceConstructor<TServiceConstructor>()
where TServiceConstructor : ServiceConstructor
public:
generic<typename TServiceConstructor>
where TServiceConstructor : ServiceConstructor
TServiceConstructor GetServiceConstructor()
member GetServiceConstructor : unit -> 'TServiceConstructor when 'TServiceConstructor : ServiceConstructor
JScript 不支持泛型类型或方法。
类型参数
- TServiceConstructor
一个 Type,它标识要返回的 ServiceConstructor 对象。
返回值
类型:TServiceConstructor
指定 Type 的已注册服务。
异常
异常 | 条件 |
---|---|
ExtensibilityException | 多个服务构造函数与请求的 Type 匹配,或者找不到匹配的构造函数。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。