Readers Class

Reads and checks XML reader.

C#
public static class Readers
Inheritance
Readers

Methods

ConfirmNext(XmlReader)

Does nothing if there are more parsing events, or throws BindException otherwise.

ConfirmEndOfStream(XmlReader)

Skips the text and checks End Of Stream in the specified XML reader. If the specified XML reader does not reach at the end of the stream, throws BindException.

ConfirmStartElement(XmlReader, XmlQualifiedName)

Does nothing if the element of the specified local name starts at the specified XML reader, or throws BindException otherwise.

ConfirmEndElement(XmlReader, XmlQualifiedName)

Does nothing if the element of the specified local name ends at the specified XML reader, or throws BindException otherwise.

SkipCharacters(XmlReader)

Skips the text in the specified XML reader.

NewEvent<T>(IXmlLineInfo, T)

Returns the new BindEvent<T> object of the specified value and the specified location information.

NewEventObject(IXmlLineInfo, object)

Returns the new BindEvent<T> object of the specified value and the specified location information.

ToXmlLineInfo(XmlReader)

Gets the new IXmlLineInfo object associated with the specified XML reader.

AsXmlLineInfo(XmlReader)

Gets the IXmlLineInfo object associated with the specified XML reader.

NewBindExceptionDueToEmptyElement(XmlReader, XmlQualifiedName)

Creates a new BindException representing the lack of the mandatory child element in the empty element.

NewQName(XmlReader)

Gets a new XmlQualifiedName of the specified XmlReader.

Equals(XmlReader, XmlQualifiedName)

Gets whether the name that the specifed XML reader represents equals to the specified qualified name.

Methods Detail

ConfirmNext(XmlReader)

Does nothing if there are more parsing events, or throws BindException otherwise.

C#
public static void ConfirmNext(XmlReader @in)

Parameters

in
XmlReader

The XML reader.

ConfirmEndOfStream(XmlReader)

Skips the text and checks End Of Stream in the specified XML reader. If the specified XML reader does not reach at the end of the stream, throws BindException.

C#
public static void ConfirmEndOfStream(XmlReader @in)

Parameters

in
XmlReader

The XML reader.

ConfirmStartElement(XmlReader, XmlQualifiedName)

Does nothing if the element of the specified local name starts at the specified XML reader, or throws BindException otherwise.

C#
public static void ConfirmStartElement(XmlReader @in, XmlQualifiedName expectedName)

Parameters

in
XmlReader

The XML reader.

expectedName
XmlQualifiedName

The local name that is expected.

ConfirmEndElement(XmlReader, XmlQualifiedName)

Does nothing if the element of the specified local name ends at the specified XML reader, or throws BindException otherwise.

C#
public static void ConfirmEndElement(XmlReader @in, XmlQualifiedName expectedName)

Parameters

in
XmlReader

The XML reader.

expectedName
XmlQualifiedName

The local name that is expected.

SkipCharacters(XmlReader)

Skips the text in the specified XML reader.

C#
public static XmlNodeType SkipCharacters(XmlReader @in)

Parameters

in
XmlReader

The XML reader.

Returns

The current node type other than the text.

NewEvent<T>(IXmlLineInfo, T)

Returns the new BindEvent<T> object of the specified value and the specified location information.

C#
public static BindEvent<T> NewEvent<T>(IXmlLineInfo info, T value)

Type Parameters

T
class

The type of the event value.

Parameters

info
IXmlLineInfo

The location information.

value
T

The value of the event.

Returns

The new bind event.

NewEventObject(IXmlLineInfo, object)

Returns the new BindEvent<T> object of the specified value and the specified location information.

C#
public static object NewEventObject(IXmlLineInfo info, object value)

Parameters

info
IXmlLineInfo

The location information.

value
object

The value of the event.

Returns

The new bind event.

ToXmlLineInfo(XmlReader)

Gets the new IXmlLineInfo object associated with the specified XML reader.

C#
public static IXmlLineInfo ToXmlLineInfo(XmlReader @in)

Parameters

in
XmlReader

The XML reader.

Returns

The IXmlLineInfo object which is immutable.

AsXmlLineInfo(XmlReader)

Gets the IXmlLineInfo object associated with the specified XML reader.

C#
public static IXmlLineInfo AsXmlLineInfo(XmlReader @in)

Parameters

in
XmlReader

The XML reader.

Returns

The IXmlLineInfo object that the XML reader object is casted to, or the default IXmlLineInfo object if it is failed to cast.

NewBindExceptionDueToEmptyElement(XmlReader, XmlQualifiedName)

Creates a new BindException representing the lack of the mandatory child element in the empty element.

C#
public static BindException NewBindExceptionDueToEmptyElement(XmlReader @in, XmlQualifiedName expectedChildElementName)

Parameters

in
XmlReader

The XML reader.

expectedChildElementName
XmlQualifiedName

The name of the element that is expected as the child element.

Returns

NewQName(XmlReader)

Gets a new XmlQualifiedName of the specified XmlReader.

C#
public static XmlQualifiedName NewQName(XmlReader @in)

Parameters

in
XmlReader

The XML reader.

Returns

The new qualified name that the specified XML reader represents.

Equals(XmlReader, XmlQualifiedName)

Gets whether the name that the specifed XML reader represents equals to the specified qualified name.

C#
public static bool Equals(XmlReader @in, XmlQualifiedName qName)

Parameters

in
XmlReader

The XML reader.

qName
XmlQualifiedName

The qualified name.

Returns

true if the name that the XML reader represents equals to the qualified name, false otherwise.