C# Class BF2Statistics.Web.Bf2Stats.BF2PageModel

This object acts as a base object for all Models used in the Bf2Stats views
Afficher le fichier Open project: BF2Statistics/ControlCenter Class Usage Examples

Méthodes publiques

Свойство Type Description
Root string
SearchBarValue string
SpecificCulture System.Globalization.CultureInfo
Title string

Méthodes publiques

Méthode Description
BF2PageModel ( HttpClient Client ) : System
FormatDate ( int Time ) : string

Takes a timestamp and converts it to a data format that was used in BF2sClone

FormatNumber ( object Time ) : string

Formats an integer timestamp to a timespan format that was used in BF2sClone

FormatTime ( double Time ) : string

Formats an integer timestamp to a timespan format that was used in BF2sClone

Write ( string contents ) : string

Writes the plain contents to the template

WriteIf ( string contents, bool condition ) : string

Returns a string in the contents variable if the condition is met

WriteIfElse ( bool condition, string trueValue, string falseValue ) : string

Returns a string based on the value of the condition variable

Method Details

BF2PageModel() public méthode

public BF2PageModel ( HttpClient Client ) : System
Client HttpClient
Résultat System

FormatDate() public méthode

Takes a timestamp and converts it to a data format that was used in BF2sClone
public FormatDate ( int Time ) : string
Time int
Résultat string

FormatNumber() public méthode

Formats an integer timestamp to a timespan format that was used in BF2sClone
public FormatNumber ( object Time ) : string
Time object
Résultat string

FormatTime() public méthode

Formats an integer timestamp to a timespan format that was used in BF2sClone
public FormatTime ( double Time ) : string
Time double
Résultat string

Write() public méthode

Writes the plain contents to the template
public Write ( string contents ) : string
contents string The contents to be written
Résultat string

WriteIf() public méthode

Returns a string in the contents variable if the condition is met
public WriteIf ( string contents, bool condition ) : string
contents string The contents to be returned if the condition is met
condition bool a bool indicating whether the condition is met
Résultat string

WriteIfElse() public méthode

Returns a string based on the value of the condition variable
public WriteIfElse ( bool condition, string trueValue, string falseValue ) : string
condition bool a bool indicating whether the condition is met
trueValue string The value to return if the condition is met
falseValue string The value to return if the condition is NOT met
Résultat string

Property Details

Root public_oe property

Provides the Root url to the bf2stats pages
public string Root
Résultat string

SearchBarValue public_oe property

Gets or Sets the value in the Search bar
public string SearchBarValue
Résultat string

SpecificCulture public_oe static_oe property

Indicates the specific culture formating for dates
public static CultureInfo,System.Globalization SpecificCulture
Résultat System.Globalization.CultureInfo

Title public_oe property

Contains the title of the page
public string Title
Résultat string