C# Класс BF2Statistics.Web.Bf2Stats.BF2PageModel

This object acts as a base object for all Models used in the Bf2Stats views
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Root string
SearchBarValue string
SpecificCulture System.Globalization.CultureInfo
Title string

Открытые методы

Метод Описание
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

Описание методов

BF2PageModel() публичный Метод

public BF2PageModel ( HttpClient Client ) : System
Client HttpClient
Результат System

FormatDate() публичный Метод

Takes a timestamp and converts it to a data format that was used in BF2sClone
public FormatDate ( int Time ) : string
Time int
Результат string

FormatNumber() публичный Метод

Formats an integer timestamp to a timespan format that was used in BF2sClone
public FormatNumber ( object Time ) : string
Time object
Результат string

FormatTime() публичный Метод

Formats an integer timestamp to a timespan format that was used in BF2sClone
public FormatTime ( double Time ) : string
Time double
Результат string

Write() публичный Метод

Writes the plain contents to the template
public Write ( string contents ) : string
contents string The contents to be written
Результат string

WriteIf() публичный Метод

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
Результат string

WriteIfElse() публичный Метод

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
Результат string

Описание свойств

Root публичное свойство

Provides the Root url to the bf2stats pages
public string Root
Результат string

SearchBarValue публичное свойство

Gets or Sets the value in the Search bar
public string SearchBarValue
Результат string

SpecificCulture публичное статическое свойство

Indicates the specific culture formating for dates
public static CultureInfo,System.Globalization SpecificCulture
Результат System.Globalization.CultureInfo

Title публичное свойство

Contains the title of the page
public string Title
Результат string