C# Класс MySql.Web.Security.MySQLRoleProvider

Manages storage of role membership information for an ASP.NET application in a MySQL database.
Наследование: System.Web.Security.RoleProvider
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddUsersToRoles ( string usernames, string rolenames ) : void

Adds the users to roles.

CreateRole ( string rolename ) : void

Creates the role.

DeleteRole ( string rolename, bool throwOnPopulatedRole ) : bool

Deletes the role.

FindUsersInRole ( string rolename, string usernameToMatch ) : string[]

Finds the users in role.

GetAllRoles ( ) : string[]

Gets a list of all the roles for the configured applicationName.

GetRolesForUser ( string username ) : string[]

Gets a list of the roles that a specified user is in for the configured applicationName.

GetUsersInRole ( string rolename ) : string[]

Gets the users in role.

Initialize ( string name, NameValueCollection config ) : void

Initializes the provider.

IsUserInRole ( string username, string rolename ) : bool

Determines whether [is user in role] [the specified username].

RemoveUsersFromRoles ( string usernames, string rolenames ) : void

Removes the users from roles.

RoleExists ( string rolename ) : bool

Roles the exists.

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

Метод Описание
DeleteUserData ( MySqlConnection connection, int userId ) : void
GetRoleId ( MySqlConnection connection, string rolename ) : int
GetRolesByUserName ( MySqlConnection connection, string username ) : string[]
GetUserId ( MySqlConnection connection, string username ) : int
WriteToEventLog ( Exception e, string action ) : void

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

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

Adds the users to roles.
public AddUsersToRoles ( string usernames, string rolenames ) : void
usernames string The usernames.
rolenames string The rolenames.
Результат void

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

Creates the role.
public CreateRole ( string rolename ) : void
rolename string The rolename.
Результат void

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

Deletes the role.
public DeleteRole ( string rolename, bool throwOnPopulatedRole ) : bool
rolename string The rolename.
throwOnPopulatedRole bool if set to true [throw on populated role].
Результат bool

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

Finds the users in role.
public FindUsersInRole ( string rolename, string usernameToMatch ) : string[]
rolename string The rolename.
usernameToMatch string The username to match.
Результат string[]

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

Gets a list of all the roles for the configured applicationName.
public GetAllRoles ( ) : string[]
Результат string[]

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

Gets a list of the roles that a specified user is in for the configured applicationName.
public GetRolesForUser ( string username ) : string[]
username string The user to return a list of roles for.
Результат string[]

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

Gets the users in role.
public GetUsersInRole ( string rolename ) : string[]
rolename string The rolename.
Результат string[]

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

Initializes the provider.
The name of the provider is null. The name of the provider has a length of zero. An attempt is made to call on a provider after the provider has already been initialized.
public Initialize ( string name, NameValueCollection config ) : void
name string The friendly name of the provider.
config System.Collections.Specialized.NameValueCollection A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.
Результат void

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

Determines whether [is user in role] [the specified username].
public IsUserInRole ( string username, string rolename ) : bool
username string The username.
rolename string The rolename.
Результат bool

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

Removes the users from roles.
public RemoveUsersFromRoles ( string usernames, string rolenames ) : void
usernames string The usernames.
rolenames string The rolenames.
Результат void

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

Roles the exists.
public RoleExists ( string rolename ) : bool
rolename string The rolename.
Результат bool