Click or drag to resize
ObjectFactoryT Class
Class that provides construction of the objects of given class
Inheritance Hierarchy
SystemObject
  CMS.CoreObjectFactoryT
    More...

Namespace: CMS.Core
Assembly: CMS.Core (in CMS.Core.dll) Version: 8.2.23
Syntax
C#
public class ObjectFactory<T> : IObjectFactory

Type Parameters

T

The ObjectFactoryT type exposes the following members.

Constructors
Methods
  NameDescription
Public methodCanCreateObject
Returns true if the factory is able to create the object based on the given parameter
Protected methodCreateActivator
Creates an object activator for the created type
Protected methodCreateInstance
Creates a new instance of the object
Public methodCreateNewObject
Creates and returns a new object
Public methodCreateNewTypedObject
Creates and returns a new object
Public methodStatic memberChangeCreatedTypeTo(Type)
Replaces the creation of the given original type by the new type
Public methodStatic memberChangeCreatedTypeToNewType
Replaces the creation of the given original type by the new type
Public methodStatic memberNew
Creates a new object of the given type
Public methodStatic memberReset
Resets the factory to a default state
Public methodStatic memberSetDefaultObjectTypeToNewType
Sets the default object type created by the factory to the given type
Public methodStatic memberStaticSingleton
Provides a static singleton instance of the object implementing this interface
Public methodStatic memberStaticSingletonTParent
Returns static singleton for the given object type
Top
Extension Methods
  NameDescription
Public Extension MethodAsValue
Converts object to a query value which can be used as a query parameter
(Defined by QueryExtensions.)
Public Extension MethodGetAPIString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodGetString
Gets the string by the specified resource key
(Defined by CoreExtensions.)
Public Extension MethodToBoolean
Returns the boolean representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDateTime
Returns the DateTime representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToDouble
Returns the double representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToGuid
Returns the Guid representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToInteger
Returns the integer representation of an object or default value if not.
(Defined by CoreExtensions.)
Public Extension MethodToString
Returns the string representation of an object or default value if not.
(Defined by CoreExtensions.)
Top
Properties
  NameDescription
Public propertyStatic memberCanReplaceCurrent
If true, the default object factory can be replaced by other factory
Protected propertyConstructor
Constructor used for dependency injection
Public propertyCreatedType
Returns the type created by this factory
Public propertyStatic memberCurrentFactory
Current factory to create objects, includes initialization of the core if interface factory is not initialized
Public propertyInitializer
Object initialization function
Public propertyStatic memberIsDefault
Returns true if the object factory is the default one (giving out the exact type that defines it)
Public propertyStatic memberIsInitialized
Returns true if the default factory is initialized
Public propertySingleton
Singleton instance of the created object type
Protected propertyUseCompiledLambda
If true, the compiled lambda expression is used to create new objects. Set to true if the factory will be creating a lot of objects
Top
See Also
Inheritance Hierarchy