C# Класс EasyAuth.Storage.MemoryUserStore

Stores users in a list in memory.
Наследование: IUserStore
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddUser ( string username, string password ) : void
DeleteUserById ( int id ) : void
GetAllUsers ( ) : List
GetUserById ( int id ) : User

Return a clone of the user data object This is so that they are forced to use the update method rather than just changing the object directly.

GetUserByUsername ( string username ) : User

Return a clone of the user data object This is so that they are forced to use the update method rather than just changing the object directly.

UpdateUserById ( int id, User newUser ) : void
UserExistsById ( int id ) : bool
UserExistsByUsername ( string username ) : bool

Защищенные методы

Метод Описание
GetActualUserById ( int id ) : User

Return the actual object reference for the user We can use this to search by reference in the List<>

GetActualUserByUsername ( string username ) : User

Return the actual object reference for the user We can use this to search by reference in the List<>

Приватные методы

Метод Описание
MemoryUserStore ( ) : System
Reset ( ) : void

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

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

public AddUser ( string username, string password ) : void
username string
password string
Результат void

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

public DeleteUserById ( int id ) : void
id int
Результат void

GetActualUserById() защищенный Метод

Return the actual object reference for the user We can use this to search by reference in the List<>
protected GetActualUserById ( int id ) : User
id int
Результат User

GetActualUserByUsername() защищенный Метод

Return the actual object reference for the user We can use this to search by reference in the List<>
protected GetActualUserByUsername ( string username ) : User
username string
Результат User

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

public GetAllUsers ( ) : List
Результат List

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

Return a clone of the user data object This is so that they are forced to use the update method rather than just changing the object directly.
public GetUserById ( int id ) : User
id int
Результат User

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

Return a clone of the user data object This is so that they are forced to use the update method rather than just changing the object directly.
public GetUserByUsername ( string username ) : User
username string
Результат User

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

public UpdateUserById ( int id, User newUser ) : void
id int
newUser User
Результат void

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

public UserExistsById ( int id ) : bool
id int
Результат bool

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

public UserExistsByUsername ( string username ) : bool
username string
Результат bool