C# Class SimpleFramework.Xml.Core.Scanner

The Scanner object performs the reflective inspection of a class and builds a map of attributes and elements for each annotated field. This acts as a cachable container for reflection actions performed on a specific type. When scanning the provided class this inserts the scanned field as a Label in to a map so that it can be retrieved by name. Annotations classified as attributes have the Attribute annotation, all other annotated fields are stored as elements.
ファイルを表示 Open project: ngallagher/simplexml Class Usage Examples

Public Methods

Method Description
GetAttributes ( Context context ) : LabelMap

Returns a LabelMap that contains the details for all fields marked as XML attributes. This returns a new map each time the method is called, the goal is to ensure that any object using the label map can manipulate it without changing the core details of the schema, allowing it to be cached.

GetCaller ( Context context ) : Caller
GetElements ( Context context ) : LabelMap

Returns a LabelMap that contains the details for all fields marked as XML elements. The annotations that are considered elements are the ElementList and the Element annotations. This returns a copy of the details extracted from the schema class so this can be cached.

Scanner ( Class type ) : SimpleFramework.Xml

Constructor for the Scanner object. This is used to scan the provided class for annotations that are used to build a schema for an XML file to follow.

Method Details

GetAttributes() public method

Returns a LabelMap that contains the details for all fields marked as XML attributes. This returns a new map each time the method is called, the goal is to ensure that any object using the label map can manipulate it without changing the core details of the schema, allowing it to be cached.
public GetAttributes ( Context context ) : LabelMap
context Context /// this is the context used to style the names ///
return LabelMap

GetCaller() public method

public GetCaller ( Context context ) : Caller
context Context
return Caller

GetElements() public method

Returns a LabelMap that contains the details for all fields marked as XML elements. The annotations that are considered elements are the ElementList and the Element annotations. This returns a copy of the details extracted from the schema class so this can be cached.
public GetElements ( Context context ) : LabelMap
context Context /// this is the context used to style the names ///
return LabelMap

Scanner() public method

Constructor for the Scanner object. This is used to scan the provided class for annotations that are used to build a schema for an XML file to follow.
public Scanner ( Class type ) : SimpleFramework.Xml
type Class /// this is the type that is scanned for a schema ///
return SimpleFramework.Xml