ExtensionManager.TryGetSingleExtension<TInterfaceType> Method
Tries to acquire a single extension of the provided Generic type.
Namespace: Microsoft.Data.Schema.Extensibility
Assembly: Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)
Syntax
'Declaration
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 does not support generic types or methods.
Type Parameters
- TInterfaceType
An interface that derives from the IExtension interface.
Parameters
- extensionHandle
Type: Microsoft.Data.Schema.Extensibility.ExtensionHandle<TInterfaceType>%
If a single extension is found, an ExtensionHandle<TInterfaceType> object that implements the TInterfaceType interface; otherwise, nulla null reference (Nothing in Visual Basic).
Return Value
Type: System.Boolean
true if a single extension is found; otherwise, nulla null reference (Nothing in Visual Basic).
Remarks
If multiple extensions are found or if no extension is found, or if the TInterfaceType Generic parameter supports multiple extensions, the method returns false and the extensionHandle (an out parameter) is nulla null reference (Nothing in Visual Basic).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.