C# Class CsQuery.Engine.PseudoSelector

Base class for any pseudoselector that implements validation of min/max parameter values, and argument validation. When implementing a pseudoselector, you must also implement an interface for the type of pseudoselector
Inheritance: IPseudoSelector
显示文件 Open project: prepare/HTML-Renderer

Protected Methods

Method Description
InvalidArgumentsError ( ) : string

Get a string for an error when there are invalid arguments

ParameterCountMismatchError ( ) : string

Gets the string for a parameter count mismatch error.

ParameterQuoted ( int index ) : QuotingRule

A value to determine how to parse the string for a parameter at a specific index.

ParseArgs ( string value ) : string[]

Parse the arguments using the rules returned by the ParameterQuoted method.

ParseSingleArg ( string value ) : string

Parse single argument passed to a pseudoselector

ValidateParameters ( string parameters ) : void

Validates a parameter array against the expected number of parameters.

Method Details

InvalidArgumentsError() protected method

Get a string for an error when there are invalid arguments
protected InvalidArgumentsError ( ) : string
return string

ParameterCountMismatchError() protected method

Gets the string for a parameter count mismatch error.
protected ParameterCountMismatchError ( ) : string
return string

ParameterQuoted() protected method

A value to determine how to parse the string for a parameter at a specific index.
protected ParameterQuoted ( int index ) : QuotingRule
index int /// Zero-based index of the parameter. ///
return QuotingRule

ParseArgs() protected method

Parse the arguments using the rules returned by the ParameterQuoted method.
protected ParseArgs ( string value ) : string[]
value string /// The arguments ///
return string[]

ParseSingleArg() protected method

Parse single argument passed to a pseudoselector
/// Thrown when one or more arguments have unsupported or illegal values. /// /// Thrown when the requested operation is unimplemented. ///
protected ParseSingleArg ( string value ) : string
value string /// The arguments. ///
return string

ValidateParameters() protected method

Validates a parameter array against the expected number of parameters.
/// Thrown when the wrong number of parameters is passed. ///
protected ValidateParameters ( string parameters ) : void
parameters string /// Criteria (or parameter) data passed with the pseudoselector. ///
return void