C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

GetAttributes() публичный Метод

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 ///
Результат LabelMap

GetCaller() публичный Метод

public GetCaller ( Context context ) : Caller
context Context
Результат Caller

GetElements() публичный Метод

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 ///
Результат LabelMap

Scanner() публичный Метод

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 ///
Результат SimpleFramework.Xml