Metadata Class

Represents metadata that binds a class and its constructor parameters to an XML element.

C#
public abstract class Metadata
Inheritance
Metadata
Derived

Remarks

Metadata objects are immutable.

Constructors

Metadata(AttributeBank)

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

RequiredElement(XmlReader, Func<Type, Metadata>)

Returns a new instance bound to the root XML element that is read from the specified XML reader.

CreateInstance(XmlReader, Func<Type, Metadata>)

Creates 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.

HandleComponentsWithEmptyElement(object[], XmlReader, Func<Type, Metadata>)

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.

C#
protected Metadata(AttributeBank bank)

Parameters

bank
AttributeBank

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.

C#
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.

C#
public object RequiredElement(XmlReader @in, Func<Type, Metadata> getMetadata)

Parameters

in
XmlReader

The XML reader that provides the input stream.

getMetadata
Func<Type, Metadata>

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.

C#
public object CreateInstance(XmlReader @in, Func<Type, Metadata> getMetadata)

Parameters

in
XmlReader

The XML reader that provides the input stream.

getMetadata
Func<Type, Metadata>

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.

C#
protected abstract void HandleComponentsWithContent(object[] arguments, XmlReader @in, Func<Type, Metadata> getMetadata)

Parameters

arguments
object[]

The array of constructor arguments to populate.

in
XmlReader

The XML reader that provides the input stream.

getMetadata
Func<Type, Metadata>

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.

C#
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
XmlReader

The XML reader that provides the input stream.

getMetadata
Func<Type, Metadata>

The function that returns the Metadata object for the specified type.