C# Class ScrewTurn.Wiki.Preferences

Allows access to current user's preferences.
Exibir arquivo Open project: mono/ScrewTurnWiki Class Usage Examples

Public Methods

Method Description
AlignWithServerTimezone ( System.DateTime dateTime ) : System.DateTime

Aligns a date/time with the default timezone.

AlignWithTimezone ( System.DateTime dateTime ) : System.DateTime

Aligns a date/time with the User's preferences (if any).

DeletePreferencesCookie ( ) : void

Deletes the language and timezone preferences cookie.

LoadLanguageFromCookie ( ) : string

Loads the language from a cookie.

LoadLanguageFromUserData ( ) : string

Loads the language from the current user's data.

LoadTimezoneFromCookie ( ) : int?

Loads the timezone from a cookie.

LoadTimezoneFromUserData ( ) : int?

Loads the timezone from the current user's data.

SavePreferencesInCookie ( string culture, int timezone ) : void

Saves language and timezone preferences into a cookie.

SavePreferencesInUserData ( string culture, int timezone ) : bool

Saves language and timezone preferences into the current user's data.

Method Details

AlignWithServerTimezone() public static method

Aligns a date/time with the default timezone.
public static AlignWithServerTimezone ( System.DateTime dateTime ) : System.DateTime
dateTime System.DateTime The date/time to align.
return System.DateTime

AlignWithTimezone() public static method

Aligns a date/time with the User's preferences (if any).
public static AlignWithTimezone ( System.DateTime dateTime ) : System.DateTime
dateTime System.DateTime The date/time to align.
return System.DateTime

DeletePreferencesCookie() public static method

Deletes the language and timezone preferences cookie.
public static DeletePreferencesCookie ( ) : void
return void

LoadLanguageFromCookie() public static method

Loads the language from a cookie.
public static LoadLanguageFromCookie ( ) : string
return string

LoadLanguageFromUserData() public static method

Loads the language from the current user's data.
public static LoadLanguageFromUserData ( ) : string
return string

LoadTimezoneFromCookie() public static method

Loads the timezone from a cookie.
public static LoadTimezoneFromCookie ( ) : int?
return int?

LoadTimezoneFromUserData() public static method

Loads the timezone from the current user's data.
public static LoadTimezoneFromUserData ( ) : int?
return int?

SavePreferencesInCookie() public static method

Saves language and timezone preferences into a cookie.
public static SavePreferencesInCookie ( string culture, int timezone ) : void
culture string The culture.
timezone int The timezone.
return void

SavePreferencesInUserData() public static method

Saves language and timezone preferences into the current user's data.
public static SavePreferencesInUserData ( string culture, int timezone ) : bool
culture string The culture.
timezone int The timezone.
return bool