Class ExtensionsFactory
Implements the creation of the extension objects
Inheritance
Namespace: Sdl.Core.PluginFramework.Integration
Assembly: Sdl.Core.PluginFramework.dll
Syntax
public sealed class ExtensionsFactory : ObjectConstructors
ExtensionsFactory()
Declaration
public ExtensionsFactory()Methods
Create<TResult>(IExtension, ExtensionArguments, Boolean)
Create an extension instance based on its extension and the result type.
Declaration
public static TResult Create<TResult>(IExtension extension, ExtensionArguments arguments = null, bool useCache = true)
    where TResult : classParameters
| Type | Name | Description | 
|---|---|---|
| IExtension | extension | The extension for which the instance is created. | 
| ExtensionArguments | arguments | Optional arguments possible required by the object initializer. | 
| System.Boolean | useCache | Determines if the instance should be retrieved from the cache if exist or create a new one an store it in the cache. | 
Returns
| Type | Description | 
|---|---|
| TResult | The extension instance. | 
Type Parameters
| Name | Description | 
|---|---|
| TResult | The instance result type expected. | 
Create<TAttribute, TResult>(ExtensionArguments, Boolean)
Creates the list of all the extension objects based on there attribute and instance type.
Declaration
public static IEnumerable<TResult> Create<TAttribute, TResult>(ExtensionArguments arguments = null, bool useCache = true)
    where TAttribute : ExtensionAttribute where TResult : classParameters
| Type | Name | Description | 
|---|---|---|
| ExtensionArguments | arguments | Optional arguments possible required by the object initializer. | 
| System.Boolean | useCache | Determines if the instance should be retrieved from the cache if exist or create a new one an store it in the cache. | 
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<TResult> | The extension instance. | 
Type Parameters
| Name | Description | 
|---|---|
| TAttribute | The attributes which decorates the extension classes. | 
| TResult | The instance result type expected. |