C# 클래스 Fluqi.Core.Options

Models a set of options that are common against all jQuery UI and the class library. For instance "RenderCSS" is a decision you'd make across your application (i.e. do we care about non-JavaScript users or not).
파일 보기 프로젝트 열기: toepoke/Fluqi

공개 메소드들

메소드 설명
Options ( ) : System

Constructor

ToString ( ) : string

Renders the JavaScript required to set the options with the settings that are configured for this widget.

보호된 메소드들

메소드 설명
DiscoverOptions ( Core options ) : void

Entry point for a widget to add a list of options that the widget should render when the JavaScript is written out.

IsBool ( string value ) : bool

Establishes if the given value is a numeric value or not (note +10 and -10 are considered numeric too).

IsDefault ( int value, int defaultValue ) : bool

Establishes if the given value is null, empty or the same as the default. We look at the default value because if we're rendering the default we don't need to output the setting (as it's the default for the jQuery UI control) and thus we can reduce the JavaScript needed to initialise the control (which can be fairly big if you've got 20+ options (never mind readability!))

IsEmptyQuotes ( string value ) : bool

Establishes if the given value is merely a set of empty quotes (either "" or '').

IsJSON ( string value ) : bool

Establishes whether the given value is considered to be a JSON string

To determine this we simply look for the presence of "{", "}", "," or ":"

IsNullEmptyOrDefault ( List values, List defaultValues ) : bool

Establishes if the given value is null, empty or the same as the default. We look at the default value because if we're rendering the default we don't need to output the setting (as it's the default for the jQuery UI control) and thus we can reduce the JavaScript needed to initialise the control (which can be fairly big if you've got 20+ options (never mind readability!))

IsNullEmptyOrDefault ( string value, string defaultValue ) : bool

Establishes if the given value is null, empty or the same as the default. We look at the default value because if we're rendering the default we don't need to output the setting (as it's the default for the jQuery UI control) and thus we can reduce the JavaScript needed to initialise the control (which can be fairly big if you've got 20+ options (never mind readability!))

IsNullOrEmpty ( string value ) : bool

Shortcut for working out if the given parameter is null or empty

IsNumeric ( string value ) : bool

Establishes if the given value is a numeric value or not (note +10 and -10 are considered numeric too).

IsRelativeDateSpec ( string value ) : bool

Establishes whether the given value is considered to be a string representing a relative date. Some jQuery UI controls (mainly DatePicker) allow you to specify a relate date, "+10d" is "10 days in the future" and "-1m" is "one month in the past"

IsSelector ( string value ) : bool

Establishes whether the given value is considered to be a [jQuery] selector string

메소드 상세

DiscoverOptions() 보호된 메소드

Entry point for a widget to add a list of options that the widget should render when the JavaScript is written out.
protected DiscoverOptions ( Core options ) : void
options Core List of options to add widget settings to
리턴 void

IsBool() 보호된 메소드

Establishes if the given value is a numeric value or not (note +10 and -10 are considered numeric too).
protected IsBool ( string value ) : bool
value string Value to query
리턴 bool

IsDefault() 보호된 메소드

Establishes if the given value is null, empty or the same as the default. We look at the default value because if we're rendering the default we don't need to output the setting (as it's the default for the jQuery UI control) and thus we can reduce the JavaScript needed to initialise the control (which can be fairly big if you've got 20+ options (never mind readability!))
protected IsDefault ( int value, int defaultValue ) : bool
value int Options being set
defaultValue int Default for the option
리턴 bool

IsEmptyQuotes() 보호된 메소드

Establishes if the given value is merely a set of empty quotes (either "" or '').
protected IsEmptyQuotes ( string value ) : bool
value string String to check
리턴 bool

IsJSON() 보호된 메소드

Establishes whether the given value is considered to be a JSON string
To determine this we simply look for the presence of "{", "}", "," or ":"
protected IsJSON ( string value ) : bool
value string Value to be queried
리턴 bool

IsNullEmptyOrDefault() 보호된 메소드

Establishes if the given value is null, empty or the same as the default. We look at the default value because if we're rendering the default we don't need to output the setting (as it's the default for the jQuery UI control) and thus we can reduce the JavaScript needed to initialise the control (which can be fairly big if you've got 20+ options (never mind readability!))
protected IsNullEmptyOrDefault ( List values, List defaultValues ) : bool
values List Options being set
defaultValues List Defaults for the option
리턴 bool

IsNullEmptyOrDefault() 보호된 메소드

Establishes if the given value is null, empty or the same as the default. We look at the default value because if we're rendering the default we don't need to output the setting (as it's the default for the jQuery UI control) and thus we can reduce the JavaScript needed to initialise the control (which can be fairly big if you've got 20+ options (never mind readability!))
protected IsNullEmptyOrDefault ( string value, string defaultValue ) : bool
value string Options being set
defaultValue string Default for the option
리턴 bool

IsNullOrEmpty() 보호된 메소드

Shortcut for working out if the given parameter is null or empty
protected IsNullOrEmpty ( string value ) : bool
value string Value to query
리턴 bool

IsNumeric() 보호된 메소드

Establishes if the given value is a numeric value or not (note +10 and -10 are considered numeric too).
protected IsNumeric ( string value ) : bool
value string Value to query
리턴 bool

IsRelativeDateSpec() 보호된 메소드

Establishes whether the given value is considered to be a string representing a relative date. Some jQuery UI controls (mainly DatePicker) allow you to specify a relate date, "+10d" is "10 days in the future" and "-1m" is "one month in the past"
protected IsRelativeDateSpec ( string value ) : bool
value string Value to be queried
리턴 bool

IsSelector() 보호된 메소드

Establishes whether the given value is considered to be a [jQuery] selector string
protected IsSelector ( string value ) : bool
value string Value to be queried
리턴 bool

Options() 공개 메소드

Constructor
public Options ( ) : System
리턴 System

ToString() 공개 메소드

Renders the JavaScript required to set the options with the settings that are configured for this widget.
public ToString ( ) : string
리턴 string