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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。