Partilhar via


IGuardedOperations.InstantiateExtension Method

Definition

Overloads

InstantiateExtension<TExtension,TMetadata,TExtensionInstance>(Object, Lazy<TExtension,TMetadata>, Func<TExtension,TExtensionInstance>)

Safely invokes a delegate on the extension point.

InstantiateExtension<TExtension,TMetadata>(Object, Lazy<TExtension,TMetadata>)

Safely instantiates an extension point.

InstantiateExtension<TExtension>(Object, Lazy<TExtension>)

Safely instantiates an extension point.

InstantiateExtension<TExtension,TMetadata,TExtensionInstance>(Object, Lazy<TExtension,TMetadata>, Func<TExtension,TExtensionInstance>)

Safely invokes a delegate on the extension point.

public:
generic <typename TExtension, typename TMetadata, typename TExtensionInstance>
 TExtensionInstance InstantiateExtension(System::Object ^ errorSource, Lazy<TExtension, TMetadata> ^ provider, Func<TExtension, TExtensionInstance> ^ getter);
public TExtensionInstance InstantiateExtension<TExtension,TMetadata,TExtensionInstance> (object errorSource, Lazy<TExtension,TMetadata> provider, Func<TExtension,TExtensionInstance> getter);
abstract member InstantiateExtension : obj * Lazy<'Extension, 'Metadata> * Func<'Extension, 'ExtensionInstance> -> 'ExtensionInstance
Public Function InstantiateExtension(Of TExtension, TMetadata, TExtensionInstance) (errorSource As Object, provider As Lazy(Of TExtension, TMetadata), getter As Func(Of TExtension, TExtensionInstance)) As TExtensionInstance

Type Parameters

TExtension
TMetadata
TExtensionInstance

Parameters

errorSource
Object

Reference to the object that will be blamed for potential exceptions.

provider
Lazy<TExtension,TMetadata>

Lazy reference that will be initialized.

getter
Func<TExtension,TExtensionInstance>

Delegate which constructs an instance of the extension from its provider.

Returns

TExtensionInstance

The result of getter.

Remarks

This class supports the Visual Studio infrastructure and in general is not intended to be used directly from your code.

Applies to

InstantiateExtension<TExtension,TMetadata>(Object, Lazy<TExtension,TMetadata>)

Safely instantiates an extension point.

public:
generic <typename TExtension, typename TMetadata>
 TExtension InstantiateExtension(System::Object ^ errorSource, Lazy<TExtension, TMetadata> ^ provider);
public TExtension InstantiateExtension<TExtension,TMetadata> (object errorSource, Lazy<TExtension,TMetadata> provider);
abstract member InstantiateExtension : obj * Lazy<'Extension, 'Metadata> -> 'Extension
Public Function InstantiateExtension(Of TExtension, TMetadata) (errorSource As Object, provider As Lazy(Of TExtension, TMetadata)) As TExtension

Type Parameters

TExtension
TMetadata

Parameters

errorSource
Object

Reference to the object that will be blamed for potential exceptions.

provider
Lazy<TExtension,TMetadata>

Lazy reference that will be initialized.

Returns

TExtension

Initialized instance stored in provider.

Remarks

This class supports the Visual Studio infrastructure and in general is not intended to be used directly from your code.

Applies to

InstantiateExtension<TExtension>(Object, Lazy<TExtension>)

Safely instantiates an extension point.

public:
generic <typename TExtension>
 TExtension InstantiateExtension(System::Object ^ errorSource, Lazy<TExtension> ^ provider);
public TExtension InstantiateExtension<TExtension> (object errorSource, Lazy<TExtension> provider);
abstract member InstantiateExtension : obj * Lazy<'Extension> -> 'Extension
Public Function InstantiateExtension(Of TExtension) (errorSource As Object, provider As Lazy(Of TExtension)) As TExtension

Type Parameters

TExtension

Parameters

errorSource
Object

Reference to the object that will be blamed for potential exceptions.

provider
Lazy<TExtension>

Lazy reference that will be initialized.

Returns

TExtension

Initialized instance stored in provider.

Remarks

This class supports the Visual Studio infrastructure and in general is not intended to be used directly from your code.

Applies to