C# 클래스 ImaginationServer.Common.DbUtils

Utility class, used for managing the Redis database.
상속: IDisposable
파일 보기 프로젝트 열기: Miclebrick/Imagination-Server 1 사용 예제들

공개 메소드들

메소드 설명
AccountExists ( string username ) : bool

Does an account of this username exist?

AddCharacter ( Character character ) : void

Adds/updates a character to the database.

CharacterExists ( long id, bool notRaw ) : bool

Does a character of this ID exist?

CharacterExists ( string username ) : bool

Does a character of this username exist?

CreateAccount ( string username, string password ) : Account

Creates an account with specified username and password.

DbUtils ( ) : System
DeleteAccount ( Account account ) : void

Deletes the specified account.

DeleteCharacter ( Character character ) : void

Removes a character from the database, and its owner account.

Dispose ( ) : void
GetAccount ( string username ) : Account

Retrieves the data of account with the specified username.

GetCharacter ( long id, bool notRaw = false ) : Character

Gets a character from their ID.

GetCharacter ( string name ) : Character

Gets a character from their name.

UpdateAccount ( Account account ) : void

Updates the data of an existing account. (Maybe you want to change the password, or add/remove users, or ban/unban the account?)

비공개 메소드들

메소드 설명
UpdateCharacter ( Character character ) : void

메소드 상세

AccountExists() 공개 메소드

Does an account of this username exist?
public AccountExists ( string username ) : bool
username string The username of the supposed account.
리턴 bool

AddCharacter() 공개 메소드

Adds/updates a character to the database.
public AddCharacter ( Character character ) : void
character ImaginationServer.Common.Data.Character The character to add.
리턴 void

CharacterExists() 공개 메소드

Does a character of this ID exist?
public CharacterExists ( long id, bool notRaw ) : bool
id long The ID of the supposed character.
notRaw bool Is this not raw?
리턴 bool

CharacterExists() 공개 메소드

Does a character of this username exist?
public CharacterExists ( string username ) : bool
username string The username of the supposed character.
리턴 bool

CreateAccount() 공개 메소드

Creates an account with specified username and password.
public CreateAccount ( string username, string password ) : Account
username string The username of the account.
password string The password of the account.
리턴 ImaginationServer.Common.Data.Account

DbUtils() 공개 메소드

public DbUtils ( ) : System
리턴 System

DeleteAccount() 공개 메소드

Deletes the specified account.
public DeleteAccount ( Account account ) : void
account ImaginationServer.Common.Data.Account The account to delete.
리턴 void

DeleteCharacter() 공개 메소드

Removes a character from the database, and its owner account.
public DeleteCharacter ( Character character ) : void
character ImaginationServer.Common.Data.Character The character to delete.
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetAccount() 공개 메소드

Retrieves the data of account with the specified username.
public GetAccount ( string username ) : Account
username string The username of the account.
리턴 ImaginationServer.Common.Data.Account

GetCharacter() 공개 메소드

Gets a character from their ID.
public GetCharacter ( long id, bool notRaw = false ) : Character
id long The character ID.
notRaw bool Is this not raw?
리턴 ImaginationServer.Common.Data.Character

GetCharacter() 공개 메소드

Gets a character from their name.
public GetCharacter ( string name ) : Character
name string The character's name.
리턴 ImaginationServer.Common.Data.Character

UpdateAccount() 공개 메소드

Updates the data of an existing account. (Maybe you want to change the password, or add/remove users, or ban/unban the account?)
public UpdateAccount ( Account account ) : void
account ImaginationServer.Common.Data.Account The account to update.
리턴 void