C# 클래스 BF2Statistics.Database.GamespyDatabase

A class to provide common tasks against the Gamespy Login Database
상속: BF2Statistics.Database.DatabaseDriver, IDisposable
파일 보기 프로젝트 열기: BF2Statistics/ControlCenter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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