C# Class SimpleFramework.Xml.Core.ParameterFactory

The ParameterFactory object is used to create instances of the Parameter object. Each parameter created can be used to validate against the annotated fields and methods to ensure that the annotations are compatible.

The Parameter objects created by this are selected using the XML annotation type. If the annotation type is not known the factory will throw an exception, otherwise a parameter instance is created that will expose the properties of the annotation.

Afficher le fichier Open project: ngallagher/simplexml

Méthodes publiques

Méthode Description
GetConstructor ( Annotation label ) : Constructor

Creates a constructor that is used to instantiate the parameter used to represent the specified annotation. The constructor created by this method takes three arguments, a constructor, an annotation, and the parameter index.

GetEntry ( Annotation label ) : Entry

Creates an entry that is used to select the constructor for the parameter. Each parameter must implement a constructor that takes a constructor, and annotation, and the index of the parameter. If the annotation is not know this method throws an exception.

GetInstance ( Constructor method, Annotation label, int index ) : Parameter

Creates a Parameter using the provided constructor and the XML annotation. The parameter produced contains all information related to the constructor parameter. It knows the name of the XML entity, as well as the type.

Method Details

GetConstructor() public méthode

Creates a constructor that is used to instantiate the parameter used to represent the specified annotation. The constructor created by this method takes three arguments, a constructor, an annotation, and the parameter index.
public GetConstructor ( Annotation label ) : Constructor
label Annotation /// the XML annotation representing the label ///
Résultat Constructor

GetEntry() public méthode

Creates an entry that is used to select the constructor for the parameter. Each parameter must implement a constructor that takes a constructor, and annotation, and the index of the parameter. If the annotation is not know this method throws an exception.
public GetEntry ( Annotation label ) : Entry
label Annotation /// the XML annotation used to create the parameter ///
Résultat Entry

GetInstance() public méthode

Creates a Parameter using the provided constructor and the XML annotation. The parameter produced contains all information related to the constructor parameter. It knows the name of the XML entity, as well as the type.
public GetInstance ( Constructor method, Annotation label, int index ) : Parameter
method Constructor /// this is the constructor the parameter exists in ///
label Annotation /// represents the XML annotation for the contact ///
index int
Résultat Parameter