Metadata Class
Represents metadata that binds a class and its constructor parameters to an XML element.
public abstract class Metadata
- Inheritance
-
Metadata
- Derived
Remarks
Metadata
objects are immutable.
Constructors
Metadata(Attribute |
Represents metadata that binds a class and its constructor parameters to an XML element. |
Properties
Bank |
Gets the attribute bank associated with this metadata. |
Methods
Required |
Returns a new instance bound to the root XML element that is read from the specified XML reader. |
Create |
Creates a new instance bound to the next XML element in the specified XML reader. |
Handle |
Handles the components of the instance using the content of the current XML element provided by the specified XML reader. |
Handle |
Handles component binding when the XML reader encounters an empty element. |
Equals(object) | (Inherited from object) |
GetHashCode() | (Inherited from object) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |
Constructors Detail
Metadata(AttributeBank)
Represents metadata that binds a class and its constructor parameters to an XML element.
protected Metadata(AttributeBank bank)
Parameters
- bank
-
Attribute
Bank
The attribute bank to be associated with this metadata.
Remarks
Metadata
objects are immutable.
Properties Detail
Bank
Gets the attribute bank associated with this metadata.
public AttributeBank Bank { get; }
Property Value
Methods Detail
RequiredElement(XmlReader, Func<Type, Metadata>)
Returns a new instance bound to the root XML element that is read from the specified XML reader.
public object RequiredElement(XmlReader @in, Func<Type, Metadata> getMetadata)
Parameters
- in
-
Xml
Reader
The XML reader that provides the input stream.
The function that returns the Metadata object for the specified type.
Returns
A new instance bound to the root XML element.
CreateInstance(XmlReader, Func<Type, Metadata>)
Creates a new instance bound to the next XML element in the specified XML reader.
public object CreateInstance(XmlReader @in, Func<Type, Metadata> getMetadata)
Parameters
- in
-
Xml
Reader
The XML reader that provides the input stream.
The function that returns the Metadata object for the specified type.
Returns
A new instance bound to the next XML element in the specified XML reader.
HandleComponentsWithContent(object[], XmlReader, Func<Type, Metadata>)
Handles the components of the instance using the content of the current XML element provided by the specified XML reader.
protected abstract void HandleComponentsWithContent(object[] arguments, XmlReader @in, Func<Type, Metadata> getMetadata)
Parameters
- arguments
- object[]
The array of constructor arguments to populate.
- in
-
Xml
Reader
The XML reader that provides the input stream.
The function that returns the Metadata object for the specified type.
HandleComponentsWithEmptyElement(object[], XmlReader, Func<Type, Metadata>)
Handles component binding when the XML reader encounters an empty element.
protected abstract void HandleComponentsWithEmptyElement(object[] arguments, XmlReader @in, Func<Type, Metadata> getMetadata)
Parameters
- arguments
- object[]
The arguments for the constructor parameters to be injected.
- in
-
Xml
Reader
The XML reader that provides the input stream.