TextMetadata Class
Metadata of the classes that have a single string field annotated with the ForTextAttribute.
public sealed class TextMetadata : Metadata
- Inheritance
Constructors
Text |
Initializes a new instance of the TextMetadata class. |
Text |
Initializes a new instance of the TextMetadata class. |
Properties
ElementClass |
Gets the class representing the XML element, annotated with ForElementAttribute for the class bound to this metadata. (Inherited from Metadata) |
ElementName |
Gets the name of the XML element, which is the value of the annotation ForElementAttribute for the class bound to this metadata. (Inherited from Metadata) |
Methods
Handle |
Description copied from class: Metadata
|
Handle |
Description copied from class: Metadata
|
MandatoryElement(XmlReader, Func<Type, Metadata>) |
Returns a new instance bound to the root XML element that is read from the specified XML reader. (Inherited from Metadata) |
CreateInstance(XmlReader, Func<Type, Metadata>) |
Creates a new instance bound to the next XML element in the specified XML reader. (Inherited from Metadata) |
HandleComponentsWithContent(object, XmlReader, Func<Type, Metadata>) |
Handles the component of the specified instance with content of the element that the specified XML reader provides. (Inherited from Metadata) |
HandleComponentsWithEmptyElement(object, XmlReader, Func<Type, Metadata>) |
Handles the component of the specified instance with empty element that the specified XML reader is providing. (Inherited from Metadata) |
Equals(object) | (Inherited from object) |
GetHashCode() | (Inherited from object) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |
Constructors Detail
TextMetadata(Type, IEnumerable<FieldInfo>)
Initializes a new instance of the TextMetadata class.
public TextMetadata(Type clazz, IEnumerable<FieldInfo> list)
Parameters
- clazz
- Type
The class annotated with ForElementAttribute.
- list
-
IEnumerable<Field
Info >
The list of the instance field marked with the annotation ForTextAttribute. The type of the field must be string.
TextMetadata(Type, IEnumerable<MethodInfo>)
Initializes a new instance of the TextMetadata class.
public TextMetadata(Type clazz, IEnumerable<MethodInfo> list)
Parameters
- clazz
- Type
The class annotated with ForElementAttribute.
- list
-
IEnumerable<Method
Info >
The list of the instance method marked with the annotation FromTextAttribute. The return type of the method must be
void
and the method has the single parameter whose
type is string.
Methods Detail
HandleComponentsWithContent(object, XmlReader, Func<Type, Metadata>)
Description copied from class: Metadata
Handles the component of the specified instance with content of the element that the specified XML reader provides.
protected override void HandleComponentsWithContent(object instance, XmlReader @in, Func<Type, Metadata> getMetadata)
Parameters
- instance
- object
- in
-
Xml
Reader
HandleComponentsWithEmptyElement(object, XmlReader, Func<Type, Metadata>)
Description copied from class: Metadata
Handles the component of the specified instance with empty element that the specified XML reader is providing.
protected override void HandleComponentsWithEmptyElement(object instance, XmlReader @in, Func<Type, Metadata> getMetadata)
Parameters
- instance
- object
- in
-
Xml
Reader