C# Class ScrewTurn.Wiki.Preferences

Allows access to current user's preferences.
Afficher le fichier Open project: mono/ScrewTurnWiki Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

AlignWithTimezone() public static méthode

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.
Résultat System.DateTime

DeletePreferencesCookie() public static méthode

Deletes the language and timezone preferences cookie.
public static DeletePreferencesCookie ( ) : void
Résultat void

LoadLanguageFromCookie() public static méthode

Loads the language from a cookie.
public static LoadLanguageFromCookie ( ) : string
Résultat string

LoadLanguageFromUserData() public static méthode

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

LoadTimezoneFromCookie() public static méthode

Loads the timezone from a cookie.
public static LoadTimezoneFromCookie ( ) : int?
Résultat int?

LoadTimezoneFromUserData() public static méthode

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

SavePreferencesInCookie() public static méthode

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

SavePreferencesInUserData() public static méthode

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.
Résultat bool