C# Класс BF2Statistics.Database.GamespyDatabase

A class to provide common tasks against the Gamespy Login Database
Наследование: BF2Statistics.Database.DatabaseDriver, IDisposable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
LatestVersion System.Version

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

Метод Описание
CreateSqlTables ( ) : void

Tells the Database to install the Stats tables into the database

CreateUser ( int Pid, string Nick, string Pass, string Email, string Country ) : bool

Creates a new Gamespy Account

Only used in the Gamespy Account Creation Form

CreateUser ( string Nick, string Pass, string Email, string Country ) : int

Creates a new Gamespy Account

Used by the login server when a create account request is made

DeleteUser ( int Pid ) : int

Deletes a Gamespy Account

DeleteUser ( string Nick ) : int

Deletes a Gamespy Account

GamespyDatabase ( ) : System

Creates a new connection to the Gamespy Database

GetNumAccounts ( ) : int

Returns the number of accounts in the database

GetPlayerId ( string Nick ) : int

Fetches a Gamespy Account id from an account name

GetUser ( int Pid ) : object>.Dictionary

Fetches an account from the gamespy database

GetUser ( string Nick ) : object>.Dictionary

Fetches an account from the gamespy database

GetUsersByEmailPass ( string Email, string Password ) : object>>.List

Fetches an account from the gamespy database

GetUsersLike ( string Nick ) : List

Returns a list of player names that are similar to the passed parameter

MigrateTables ( ) : void

If there is any table updates that need to be applied, calling this method will apply each update until the current database version is up to date

SetPlayerId ( string Nick, int Pid ) : int

Sets the Account (Player) Id for an account by Name

UpdateUser ( int Id, int NewPid, string NewNick, string NewPassword, string NewEmail ) : void

Updates an Account's information by ID

UpdateUser ( string Nick, string Country ) : void

Updates an Accounts Country Code

UserExists ( int PID ) : bool

Returns wether an account exists from the provided Account Id

UserExists ( string Nick ) : bool

Returns wether an account exists from the provided Nick

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

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

Tells the Database to install the Stats tables into the database
public CreateSqlTables ( ) : void
Результат void

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

Creates a new Gamespy Account
Only used in the Gamespy Account Creation Form
public CreateUser ( int Pid, string Nick, string Pass, string Email, string Country ) : bool
Pid int The Profile Id to assign this account
Nick string The Account Name
Pass string The UN-HASHED Account Password
Email string The Account Email Address
Country string The Country Code for this Account
Результат bool

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

Creates a new Gamespy Account
Used by the login server when a create account request is made
public CreateUser ( string Nick, string Pass, string Email, string Country ) : int
Nick string The Account Name
Pass string The UN-HASHED Account Password
Email string The Account Email Address
Country string The Country Code for this Account
Результат int

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

Deletes a Gamespy Account
public DeleteUser ( int Pid ) : int
Pid int
Результат int

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

Deletes a Gamespy Account
public DeleteUser ( string Nick ) : int
Nick string The Player's Nick, a.k.a Account name
Результат int

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

Creates a new connection to the Gamespy Database
public GamespyDatabase ( ) : System
Результат System

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

Returns the number of accounts in the database
public GetNumAccounts ( ) : int
Результат int

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

Fetches a Gamespy Account id from an account name
public GetPlayerId ( string Nick ) : int
Nick string
Результат int

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

Fetches an account from the gamespy database
public GetUser ( int Pid ) : object>.Dictionary
Pid int The account player ID
Результат object>.Dictionary

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

Fetches an account from the gamespy database
public GetUser ( string Nick ) : object>.Dictionary
Nick string The user's Nick
Результат object>.Dictionary

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

Fetches an account from the gamespy database
public GetUsersByEmailPass ( string Email, string Password ) : object>>.List
Email string The Account email
Password string the MD5 HASHED Account Password
Результат object>>.List

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

Returns a list of player names that are similar to the passed parameter
public GetUsersLike ( string Nick ) : List
Nick string
Результат List

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

If there is any table updates that need to be applied, calling this method will apply each update until the current database version is up to date
public MigrateTables ( ) : void
Результат void

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

Sets the Account (Player) Id for an account by Name
public SetPlayerId ( string Nick, int Pid ) : int
Nick string The account Nick we are setting the new Pid for
Pid int The new Pid
Результат int

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

Updates an Account's information by ID
public UpdateUser ( int Id, int NewPid, string NewNick, string NewPassword, string NewEmail ) : void
Id int The Current Account ID
NewPid int New Account ID
NewNick string New Account Name
NewPassword string New Account Password, UN HASHED. Leave empty to not set a new password
NewEmail string New Account Email Address
Результат void

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

Updates an Accounts Country Code
public UpdateUser ( string Nick, string Country ) : void
Nick string
Country string
Результат void

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

Returns wether an account exists from the provided Account Id
public UserExists ( int PID ) : bool
PID int
Результат bool

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

Returns wether an account exists from the provided Nick
public UserExists ( string Nick ) : bool
Nick string
Результат bool

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

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

Indicates the most up to date database table version
public static Version,System LatestVersion
Результат System.Version