Class ClassFactoryRegistry
Summary description for ClassFactoryCollection.
Inheritance
Inherited Members
Namespace: EPiServer.BaseLibrary
Assembly: EPiServer.BaseLibrary.dll
Version: 7.19.2Syntax
public sealed class ClassFactoryRegistry
Methods
AddFactory(IClassFactory)
Add a class factory implementation.
Declaration
public static void AddFactory(IClassFactory factory)
Parameters
| Type | Name | Description |
|---|---|---|
| IClassFactory | factory | A class factory instance that implements the IClassFactory interface. |
Remarks
The registration is usually done from the application configuration file, but you can register class factories from code by calling this method.
Clear()
Remove all registered class factories.
Declaration
public static void Clear()
Factory(String)
Get a class factory implementation.
Declaration
public static IClassFactory Factory(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | The id of the class factory. |
Returns
| Type | Description |
|---|---|
| IClassFactory | An IClassFactory implementation. |
Remarks
The returned class factory is usually specialized to allow for selecting a specific class factory from a group of factories that implement the same external interface, but returns different sets of created objects.
FactoryImplementations(Type)
Get all factories that implements a specific interface or extends a specific base class.
Declaration
public static IList<IClassFactory> FactoryImplementations(Type factoryType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | factoryType | The interface or base class that the factory must be assignemnt compatible with. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IList<IClassFactory> |