C# Класс Microsoft.CodeAnalysis.Sarif.Converters.SparseReader

A Fast XML Reader that reads only the requested entities and uses delegates to create objects along the way
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateFromStream ( SparseReaderDispatchTable dispatchTable, Stream stream ) : SparseReader

Creates a new SparseReader pointing to a System.IO.Stream rather than a System.Xml.XmlReader.

CreateFromStream ( SparseReaderDispatchTable dispatchTable, Stream stream, XmlSchemaSet schemaSet ) : SparseReader

Creates a new SparseReader pointing to a System.IO.Stream rather than a System.Xml.XmlReader.

Dispose ( ) : void

Destroys this SparseReader (and the underlying _xmlReader).

ReadAttributeBool ( string attributeName ) : bool?

Reads an attribute value as a boolean.

ReadAttributeInt ( string attributeName ) : int?

Reads an attribute value as an integer.

ReadAttributeString ( string attributeName ) : string

Reads an attribute value as a string.

ReadChildren ( string tagName, object parent ) : void

Reads the children of M:XmlReader.

ReadElementContentAsDouble ( ) : double

Reads the current element's content as a double and consumes the element.

ReadElementContentAsDoubleOrDefault ( ) : double

Attempts to the current element's content as a double and consumes the element.

ReadElementContentAsInt32 ( ) : int

Reads the current element's content as an integer and consumes the element.

ReadElementContentAsInt32OrDefault ( ) : int

Read's the current element's content and attempts to convert it to an integer. Consumes the element.

ReadElementContentAsString ( ) : string

Reads the current element's content as a string and consumes the element.

Skip ( ) : void

Skips the element on which this SparseReader is currently positioned.

SparseReader ( SparseReaderDispatchTable dispatchTable, XmlReader xmlReader ) : System

Initializes a new instance of the SparseReader class.

Приватные методы

Метод Описание
IsEndState ( string expectedTagName ) : bool
IsMatchingState ( string expectedTagName, bool isStartState = true ) : bool
ReadEndElement ( string expectedTagName ) : void
ReadStartElement ( ) : void

Описание методов

CreateFromStream() публичный статический Метод

Creates a new SparseReader pointing to a System.IO.Stream rather than a System.Xml.XmlReader.
public static CreateFromStream ( SparseReaderDispatchTable dispatchTable, Stream stream ) : SparseReader
dispatchTable SparseReaderDispatchTable The dispatch table used to fire delegates for XML elements on /// this instance.
stream Stream The stream from which XML shall be retrieved. The SparseReader takes /// ownership of this stream and is responsible for destroying it.
Результат SparseReader

CreateFromStream() публичный статический Метод

Creates a new SparseReader pointing to a System.IO.Stream rather than a System.Xml.XmlReader.
public static CreateFromStream ( SparseReaderDispatchTable dispatchTable, Stream stream, XmlSchemaSet schemaSet ) : SparseReader
dispatchTable SparseReaderDispatchTable The dispatch table used to fire delegates for XML elements on /// this instance.
stream Stream The stream from which XML shall be retrieved. The SparseReader takes /// ownership of this stream and is responsible for destroying it.
schemaSet System.Xml.Schema.XmlSchemaSet The xml schema to validate the input against
Результат SparseReader

Dispose() публичный Метод

Destroys this SparseReader (and the underlying _xmlReader).
public Dispose ( ) : void
Результат void

ReadAttributeBool() публичный Метод

Reads an attribute value as a boolean.
public ReadAttributeBool ( string attributeName ) : bool?
attributeName string Name of the attribute to read.
Результат bool?

ReadAttributeInt() публичный Метод

Reads an attribute value as an integer.
public ReadAttributeInt ( string attributeName ) : int?
attributeName string Name of the attribute to read.
Результат int?

ReadAttributeString() публичный Метод

Reads an attribute value as a string.
public ReadAttributeString ( string attributeName ) : string
attributeName string Name of the attribute to read.
Результат string

ReadChildren() публичный Метод

Reads the children of M:XmlReader.
public ReadChildren ( string tagName, object parent ) : void
tagName string Name of the tag.
parent object The parent.
Результат void

ReadElementContentAsDouble() публичный Метод

Reads the current element's content as a double and consumes the element.
public ReadElementContentAsDouble ( ) : double
Результат double

ReadElementContentAsDoubleOrDefault() публичный Метод

Attempts to the current element's content as a double and consumes the element.
public ReadElementContentAsDoubleOrDefault ( ) : double
Результат double

ReadElementContentAsInt32() публичный Метод

Reads the current element's content as an integer and consumes the element.
public ReadElementContentAsInt32 ( ) : int
Результат int

ReadElementContentAsInt32OrDefault() публичный Метод

Read's the current element's content and attempts to convert it to an integer. Consumes the element.
public ReadElementContentAsInt32OrDefault ( ) : int
Результат int

ReadElementContentAsString() публичный Метод

Reads the current element's content as a string and consumes the element.
public ReadElementContentAsString ( ) : string
Результат string

Skip() публичный Метод

Skips the element on which this SparseReader is currently positioned.
public Skip ( ) : void
Результат void

SparseReader() публичный Метод

Initializes a new instance of the SparseReader class.
public SparseReader ( SparseReaderDispatchTable dispatchTable, XmlReader xmlReader ) : System
dispatchTable SparseReaderDispatchTable The dispatch table used to fire delegates for XML elements on /// this instance.
xmlReader XmlReader The reader from which XML shall be retrieved. This SparseReader takes /// ownership of this XML reader and destroys it upon destruction.
Результат System