C# Class CsQuery.Engine.SelectorParser

Exibir arquivo Open project: prepare/HTML-Renderer Class Usage Examples

Public Methods

Method Description
IsHtml ( string text ) : bool

Return true of the text appears to be HTML (e.g. starts with a caret)

Parse ( string selector ) : CsQuery.Engine.Selector

Parse the string, and return a sequence of Selector objects

Protected Methods

Method Description
ClearCurrent ( ) : void

Clear the currently open selector

FinishSelector ( ) : void

Finishes any open selector and clears the current selector

StartNewSelector ( CombinatorType combinatorType, TraversalType traversalType ) : void

Start a new selector that does not yet have a type specified

StartNewSelector ( SelectorType selectorType ) : void

Start a new chained filter selector of the specified type.

StartNewSelector ( SelectorType selectorType, CombinatorType combinatorType, TraversalType traversalType ) : void

Close the currently active selector. If it's partial (e.g. a descendant/child marker) then merge its into into the new selector created.

StartNewSelector ( TraversalType traversalType ) : void

Start a new chained selector that does not yet have a type specified

expectsOptionallyQuotedValue ( ) : IExpectPattern

A pattern for the operand of an attribute selector

Private Methods

Method Description
AddInputSelector ( string type, string tag = null, bool combineWithPrevious = false ) : void
AddPseudoSelector ( string key ) : bool

Adds a named pseudo selector from the pseudoselector library.

AddTagSelector ( string tagName, bool combineWithPrevious = false ) : void

Method Details

ClearCurrent() protected method

Clear the currently open selector
protected ClearCurrent ( ) : void
return void

FinishSelector() protected method

Finishes any open selector and clears the current selector
protected FinishSelector ( ) : void
return void

IsHtml() public method

Return true of the text appears to be HTML (e.g. starts with a caret)
public IsHtml ( string text ) : bool
text string
return bool

Parse() public method

Parse the string, and return a sequence of Selector objects
public Parse ( string selector ) : CsQuery.Engine.Selector
selector string
return CsQuery.Engine.Selector

StartNewSelector() protected method

Start a new selector that does not yet have a type specified
protected StartNewSelector ( CombinatorType combinatorType, TraversalType traversalType ) : void
combinatorType CombinatorType
traversalType TraversalType
return void

StartNewSelector() protected method

Start a new chained filter selector of the specified type.
protected StartNewSelector ( SelectorType selectorType ) : void
selectorType SelectorType /// The selector type to start. ///
return void

StartNewSelector() protected method

Close the currently active selector. If it's partial (e.g. a descendant/child marker) then merge its into into the new selector created.
protected StartNewSelector ( SelectorType selectorType, CombinatorType combinatorType, TraversalType traversalType ) : void
selectorType SelectorType
combinatorType CombinatorType
traversalType TraversalType
return void

StartNewSelector() protected method

Start a new chained selector that does not yet have a type specified
protected StartNewSelector ( TraversalType traversalType ) : void
traversalType TraversalType
return void

expectsOptionallyQuotedValue() protected method

A pattern for the operand of an attribute selector
protected expectsOptionallyQuotedValue ( ) : IExpectPattern
return IExpectPattern