C# Class SimpleFramework.Xml.Core.ObjectFactory

The ObjectFactory is the most basic factory. This will basically check to see if there is an override type within the XML node provided, if there is then that is instantiated, otherwise the field type is instantiated. Any type created must have a default no argument constructor. If the override type is an abstract class or an interface then this factory throws an exception.
Inheritance: PrimitiveFactory
Afficher le fichier Open project: ngallagher/simplexml

Méthodes publiques

Méthode Description
ObjectFactory ( Context context, Type type ) : SimpleFramework.Xml.Strategy

Constructor for the ObjectFactory class. This is given the field class that this should create object instances of. If the field type is abstract then the XML node must have sufficient information for the Strategy object to resolve the implementation class to be instantiated.

Private Methods

Méthode Description
GetInstance ( InputNode node ) : Instance

Method Details

ObjectFactory() public méthode

Constructor for the ObjectFactory class. This is given the field class that this should create object instances of. If the field type is abstract then the XML node must have sufficient information for the Strategy object to resolve the implementation class to be instantiated.
public ObjectFactory ( Context context, Type type ) : SimpleFramework.Xml.Strategy
context Context /// the contextual object used by the persister ///
type System.Type /// this is the object type to use for this factory ///
Résultat SimpleFramework.Xml.Strategy