C# 클래스 CsQuery.StringScanner.CharacterData

A static class to provide attribute information about characters, e.g. determining whether or not it belongs to a number of predefined classes. This creates an array of every possible character with a uint that is a bitmap (of up to 32 possible values) This permits very fast access to this information since it only needs to be looked up via an index. Uses an array of 65536 uints = 256K of memory.
파일 보기 프로젝트 열기: prepare/HTML-Renderer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
charsHtmlSpaceArray char[]

공개 메소드들

메소드 설명
Closer ( char character ) : char

Return the closing character for a set of known opening enclosing characters (including single and double quotes)

CreateCharacterInfo ( ) : ICharacterInfo

Creates a new instance of the CharacterInfo class

CreateCharacterInfo ( char character ) : ICharacterInfo

Creates a new instance of the CharacterInfo class.

CreateStringInfo ( ) : IStringInfo

Creates a new StringInfo instance

CreateStringInfo ( string text ) : IStringInfo

Creates a new StringInfo instance bound to a string

GetType ( char character ) : CharacterType

Gets a type with all flags set for the types implemented by this character

IsType ( char character, CharacterType type ) : bool

Test whether a character matches a set of flags defined by the paramter

MatchingBound ( char character ) : char

Return the matching bound for known opening and closing bound characters (same as Closer, but accepts closing tags and returns openers)

비공개 메소드들

메소드 설명
CharacterData ( ) : System

Configuration of the xref of character info. This sets bitflags in the "characterFlags" array for every unicode value that defines its attributes. This creates a lookup table allowing very rapid access to metadata about a single character, useful during string-parsing and scanning.

CloserImpl ( char character ) : char
SetAlphaISO10646 ( uint hsb ) : void

Sets the bits for ISO 10646.

SetHtmlAttributeName ( uint hsb ) : void

Matches anything but the first character for a valid HTML attribute name.

SetHtmlTagNameExceptStart ( uint hsb ) : void

Add the . back in when actually parsing html

SetHtmlTagNameStart ( uint hsb ) : void

Add the : back in when actually parsing html

SetHtmlTagSelectorExceptStart ( uint hsb ) : void

Similar to above, we omit "." as a valid in-name char because it breaks chained CSS selectors.

SetHtmlTagSelectorStart ( uint hsb ) : void

We omit ":" as a valid name start character because it makes pseudoselectors impossible to parse.

SetRange ( uint flag, ushort start, ushort end ) : void
SetSelectorTerminator ( uint hsb ) : void
setBit ( char character, uint bit ) : void
setBit ( string forCharacters, uint bit ) : void

메소드 상세

Closer() 공개 정적인 메소드

Return the closing character for a set of known opening enclosing characters (including single and double quotes)
/// Thrown when the character is not a known opening bound ///
public static Closer ( char character ) : char
character char /// The opening bound character ///
리턴 char

CreateCharacterInfo() 공개 정적인 메소드

Creates a new instance of the CharacterInfo class
public static CreateCharacterInfo ( ) : ICharacterInfo
리턴 ICharacterInfo

CreateCharacterInfo() 공개 정적인 메소드

Creates a new instance of the CharacterInfo class.
public static CreateCharacterInfo ( char character ) : ICharacterInfo
character char /// The character to bind to the new instance. ///
리턴 ICharacterInfo

CreateStringInfo() 공개 정적인 메소드

Creates a new StringInfo instance
public static CreateStringInfo ( ) : IStringInfo
리턴 IStringInfo

CreateStringInfo() 공개 정적인 메소드

Creates a new StringInfo instance bound to a string
public static CreateStringInfo ( string text ) : IStringInfo
text string /// The string to bind. ///
리턴 IStringInfo

GetType() 공개 정적인 메소드

Gets a type with all flags set for the types implemented by this character
public static GetType ( char character ) : CharacterType
character char /// The character to test ///
리턴 CharacterType

IsType() 공개 정적인 메소드

Test whether a character matches a set of flags defined by the paramter
public static IsType ( char character, CharacterType type ) : bool
character char /// The character to test ///
type CharacterType /// The type to which to compare the character ///
리턴 bool

MatchingBound() 공개 정적인 메소드

Return the matching bound for known opening and closing bound characters (same as Closer, but accepts closing tags and returns openers)
/// Thrown when the requested operation is invalid. ///
public static MatchingBound ( char character ) : char
character char /// The opening bound character ///
리턴 char

프로퍼티 상세

charsHtmlSpaceArray 공개적으로 정적으로 프로퍼티

An array of all HTML "space" characters.
public static char[] charsHtmlSpaceArray
리턴 char[]