嘗試取得所提供泛型型別的單一擴充。
命名空間: Microsoft.Data.Schema.Extensibility
組件: Microsoft.Data.Schema (在 Microsoft.Data.Schema.dll 中)
語法
'宣告
Public Function TryGetSingleExtension(Of TInterfaceType As {Class, IExtension}) ( _
<OutAttribute> ByRef extensionHandle As ExtensionHandle(Of TInterfaceType) _
) As Boolean
public bool TryGetSingleExtension<TInterfaceType>(
out ExtensionHandle<TInterfaceType> extensionHandle
)
where TInterfaceType : class, IExtension
public:
generic<typename TInterfaceType>
where TInterfaceType : ref class, IExtension
bool TryGetSingleExtension(
[OutAttribute] ExtensionHandle<TInterfaceType>^% extensionHandle
)
member TryGetSingleExtension :
extensionHandle:ExtensionHandle<'TInterfaceType> byref -> bool when 'TInterfaceType : not struct and IExtension
JScript 不支援泛型型別或方法。
型別參數
- TInterfaceType
衍生自 IExtension 介面的介面。
參數
- extensionHandle
型別:Microsoft.Data.Schema.Extensibility.ExtensionHandle<TInterfaceType>%
如果找到單一擴充,則為實作 TInterfaceType 介面的 ExtensionHandle<TInterfaceType> 物件,否則為 nullNull 參照 (即 Visual Basic 中的 Nothing)。
傳回值
型別:System.Boolean
如果找到單一擴充則為 true,否則為 nullNull 參照 (即 Visual Basic 中的 Nothing)。
備註
如果找到多個副檔名或者沒有找到任何副檔名,或者如果 TInterfaceType 泛用參數支援多個副檔名,則此方法會傳回 false,extensionHandle (Out 參數) 則會是 nullNull 參照 (即 Visual Basic 中的 Nothing)。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。