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
파일 보기 프로젝트 열기: Microsoft/sarif-sdk 1 사용 예제들

공개 메소드들

메소드 설명
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