C# Class EasyAuth.Storage.MemoryUserStore

Stores users in a list in memory.
Inheritance: IUserStore
Afficher le fichier Open project: adamkdean/EasyAuth Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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<>

Private Methods

Méthode Description
MemoryUserStore ( ) : System
Reset ( ) : void

Method Details

AddUser() public méthode

public AddUser ( string username, string password ) : void
username string
password string
Résultat void

DeleteUserById() public méthode

public DeleteUserById ( int id ) : void
id int
Résultat void

GetActualUserById() protected méthode

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
Résultat User

GetActualUserByUsername() protected méthode

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
Résultat User

GetAllUsers() public méthode

public GetAllUsers ( ) : List
Résultat List

GetUserById() public méthode

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
Résultat User

GetUserByUsername() public méthode

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
Résultat User

UpdateUserById() public méthode

public UpdateUserById ( int id, User newUser ) : void
id int
newUser User
Résultat void

UserExistsById() public méthode

public UserExistsById ( int id ) : bool
id int
Résultat bool

UserExistsByUsername() public méthode

public UserExistsByUsername ( string username ) : bool
username string
Résultat bool