C# Class SimpleFramework.Xml.Core.ObjectInstance

The ObjectInstance is used to instantiate an object from the criteria provided in the given Value. If the value contains a reference then the reference is provided from this type. For performance the Context object is used to instantiate the object as it contains a reflection cache of constructors.
Inheritance: Instance
Afficher le fichier Open project: ngallagher/simplexml

Méthodes publiques

Méthode Description
GetInstance ( Class type ) : Object
IsReference ( ) : bool

This is used to determine if the type is a reference type. A reference type is a type that does not require any XML deserialization based on its annotations. Types that are references could be substitutes objects are existing ones.

ObjectInstance ( Context context, Value value ) : SimpleFramework.Xml.Strategy

Constructor for the ObjectInstance object. This is used to create an instance of the type described by the value object. If the value object contains a reference then this will simply provide that reference.

SetInstance ( Object Object ) : Object

This method is used acquire the value from the type and if possible replace the value for the type. If the value can not be replaced then an exception should be thrown. This is used to allow primitives to be inserted into a graph.

Method Details

GetInstance() public méthode

public GetInstance ( Class type ) : Object
type Class /// this is the type that is to be instantiated ///
Résultat Object

IsReference() public méthode

This is used to determine if the type is a reference type. A reference type is a type that does not require any XML deserialization based on its annotations. Types that are references could be substitutes objects are existing ones.
public IsReference ( ) : bool
Résultat bool

ObjectInstance() public méthode

Constructor for the ObjectInstance object. This is used to create an instance of the type described by the value object. If the value object contains a reference then this will simply provide that reference.
public ObjectInstance ( Context context, Value value ) : SimpleFramework.Xml.Strategy
context Context /// this is used to instantiate the object ///
value Value /// this is the value describing the instance ///
Résultat SimpleFramework.Xml.Strategy

SetInstance() public méthode

This method is used acquire the value from the type and if possible replace the value for the type. If the value can not be replaced then an exception should be thrown. This is used to allow primitives to be inserted into a graph.
public SetInstance ( Object Object ) : Object
Object Object
Résultat Object