C# Class SimpleFramework.Xml.Core.Instantiator

The Instantiator is used to instantiate types that will leverage a constructor cache to quickly create the objects. This is used by the various object factories to return type instances that can be used by converters to create the objects that will later be deserialized.
显示文件 Open project: ngallagher/simplexml Class Usage Examples

Public Methods

Method Description
GetInstance ( Class type ) : Instance

This will create an Instance that can be used to instantiate objects of the specified class. This leverages an internal constructor cache to ensure creation is quicker.

GetInstance ( Value value ) : Instance

This will create an Instance that can be used to instantiate objects of the specified class. This leverages an internal constructor cache to ensure creation is quicker.

GetObject ( Class type ) : Object

This method will instantiate an object of the provided type. If the object or constructor does not have public access then this will ensure the constructor is accessible and can be used.

Instantiator ( ) : SimpleFramework.Xml.Strategy

Constructor for the Instantiator object. This will create a constructor cache that can be used to cache all of the constructors instantiated for the required types.

Method Details

GetInstance() public method

This will create an Instance that can be used to instantiate objects of the specified class. This leverages an internal constructor cache to ensure creation is quicker.
public GetInstance ( Class type ) : Instance
type Class /// this is the type that is to be instantiated ///
return Instance

GetInstance() public method

This will create an Instance that can be used to instantiate objects of the specified class. This leverages an internal constructor cache to ensure creation is quicker.
public GetInstance ( Value value ) : Instance
value Value /// this contains information on the object instance ///
return Instance

GetObject() public method

This method will instantiate an object of the provided type. If the object or constructor does not have public access then this will ensure the constructor is accessible and can be used.
public GetObject ( Class type ) : Object
type Class /// this is used to ensure the object is accessible ///
return Object

Instantiator() public method

Constructor for the Instantiator object. This will create a constructor cache that can be used to cache all of the constructors instantiated for the required types.
public Instantiator ( ) : SimpleFramework.Xml.Strategy
return SimpleFramework.Xml.Strategy