C# Class BF2Statistics.Web.Bf2Stats.RankingsController

Inheritance: Controller
Show file Open project: BF2Statistics/ControlCenter

Protected Properties

Property Type Description
ActionNames string[]
IndexCatagories List
IndexQueries string[]

Public Methods

Method Description
FormatNumber ( object Num ) : string
GetPage ( int index ) : int

Returns the page number that the players stat would appear

HandleRequest ( MvcRoute Route ) : void
RankingsController ( HttpClient Client ) : System

Protected Methods

Method Description
GetTopFromQuery ( int id, StatsDatabase Database ) : List

Processes the query ID and returns the results

Private Methods

Method Description
FinishQuery ( string action, BF2Statistics.Database.QueryBuilder.SelectQueryBuilder builder, bool &valueIsDecimal ) : void

This method is used to fetch an array of columns we need in our detailed rankings page. It also returns in 2 out variables additional data we need to adjust our query

GetHeaderName ( string action ) : string

Converts the url action to a string that is used in the table header

ShowIndex ( ) : void
ShowRankingType ( MvcRoute Route ) : void

Method Details

FormatNumber() public method

public FormatNumber ( object Num ) : string
Num object
return string

GetPage() public method

Returns the page number that the players stat would appear
public GetPage ( int index ) : int
index int The player position
return int

GetTopFromQuery() protected method

Processes the query ID and returns the results
protected GetTopFromQuery ( int id, StatsDatabase Database ) : List
id int The Query id
Database BF2Statistics.Database.StatsDatabase The stats database connection
return List

HandleRequest() public method

public HandleRequest ( MvcRoute Route ) : void
Route MvcRoute
return void

RankingsController() public method

public RankingsController ( HttpClient Client ) : System
Client HttpClient
return System

Property Details

ActionNames protected static property

An array of Action names in the URL that are accepted
protected static string[] ActionNames
return string[]

IndexCatagories protected static property

A static array of stats catagories on the ranking index page
protected static List IndexCatagories
return List

IndexQueries protected static property

A static array of all the different ranking sections queries
protected static string[] IndexQueries
return string[]