TextMetadata Class

Metadata of the classes that have a single string field annotated with the ForTextAttribute.

C#
public sealed class TextMetadata : Metadata
Inheritance
TextMetadata

Constructors

TextMetadata(Type, IEnumerable<FieldInfo>)

Initializes a new instance of the TextMetadata class.

TextMetadata(Type, IEnumerable<MethodInfo>)

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

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.

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.

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.

C#
public TextMetadata(Type clazz, IEnumerable<FieldInfo> list)

Parameters

clazz
Type

The class annotated with ForElementAttribute.

list
IEnumerable<FieldInfo>

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.

C#
public TextMetadata(Type clazz, IEnumerable<MethodInfo> list)

Parameters

clazz
Type

The class annotated with ForElementAttribute.

list
IEnumerable<MethodInfo>

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.

C#
protected override void HandleComponentsWithContent(object instance, XmlReader @in, Func<Type, Metadata> getMetadata)

Parameters

instance
object
getMetadata
Func<Type, Metadata>

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.

C#
protected override void HandleComponentsWithEmptyElement(object instance, XmlReader @in, Func<Type, Metadata> getMetadata)

Parameters

instance
object
getMetadata
Func<Type, Metadata>