Class ExtensionsFactory
Implements the creation of the extension objects
Inherited Members
Namespace: SdlSdl.CorePluginFrameworkIntegration
Assembly: Sdl.Core.PluginFramework.dll
Syntax
public sealed class ExtensionsFactory
Constructors
ExtensionsFactory()
Declaration
public ExtensionsFactory()
Methods
Create<TResult>(IExtension, ExtensionArguments, bool)
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 : class
Parameters
Type | Name | Description |
---|---|---|
IExtension | extension | The extension for which the instance is created. |
ExtensionArguments | arguments | Optional arguments possible required by the object initializer. |
bool | 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, bool)
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 : class
Parameters
Type | Name | Description |
---|---|---|
ExtensionArguments | arguments | Optional arguments possible required by the object initializer. |
bool | 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 |
---|---|
IEnumerable | The extension instance. |
Type Parameters
Name | Description |
---|---|
TAttribute | The attributes which decorates the extension classes. |
TResult | The instance result type expected. |