C# 클래스 BlogEngine.Core.Providers.DbRoleProvider

Generic Db Role Provider
상속: System.Web.Security.RoleProvider
파일 보기 프로젝트 열기: rasmuskl/ReSharperCourse

공개 메소드들

메소드 설명
AddUsersToRoles ( string usernames, string roleNames ) : void

Adds all users in user array to all roles in role array

CreateRole ( string roleName ) : void

Adds a new role to the database

DeleteRole ( string roleName, bool throwOnPopulatedRole ) : bool

Removes a role from database

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

Returns all users in selected role with names that match usernameToMatch

GetAllRoles ( ) : string[]

Returns array of all roles in database

GetRolesForUser ( string username ) : string[]

Return an array of roles that user is in

GetUsersInRole ( string roleName ) : string[]

Returns array of users in selected role

Initialize ( string name, NameValueCollection config ) : void

Initializes the provider

IsUserInRole ( string username, string roleName ) : bool

Check to see if user is in a role

RemoveUsersFromRoles ( string usernames, string roleNames ) : void

Removes all users in user array from all roles in role array

RoleExists ( string roleName ) : bool

Checks to see if role exists

비공개 메소드들

메소드 설명
CreateConnection ( ) : DbConnectionHelper
FormatParamName ( string parameterName ) : string

Returns a formatted parameter name to include this DbRoleProvider instance's paramPrefix.

메소드 상세

AddUsersToRoles() 공개 메소드

Adds all users in user array to all roles in role array
public AddUsersToRoles ( string usernames, string roleNames ) : void
usernames string A string array of user names to be added to the specified roles.
roleNames string A string array of the role names to add the specified user names to.
리턴 void

CreateRole() 공개 메소드

Adds a new role to the database
public CreateRole ( string roleName ) : void
roleName string The name of the role to create.
리턴 void

DeleteRole() 공개 메소드

Removes a role from database
public DeleteRole ( string roleName, bool throwOnPopulatedRole ) : bool
roleName string The name of the role to delete.
throwOnPopulatedRole bool If true, throw an exception if has one or more members and do not delete .
리턴 bool

FindUsersInRole() 공개 메소드

Returns all users in selected role with names that match usernameToMatch
public FindUsersInRole ( string roleName, string usernameToMatch ) : string[]
roleName string The role to search in.
usernameToMatch string The user name to search for.
리턴 string[]

GetAllRoles() 공개 메소드

Returns array of all roles in database
public GetAllRoles ( ) : string[]
리턴 string[]

GetRolesForUser() 공개 메소드

Return an array of roles that user is in
public GetRolesForUser ( string username ) : string[]
username string The user to return a list of roles for.
리턴 string[]

GetUsersInRole() 공개 메소드

Returns array of users in selected role
public GetUsersInRole ( string roleName ) : string[]
roleName string The name of the role to get the list of users for.
리턴 string[]

Initialize() 공개 메소드

Initializes the provider
public Initialize ( string name, NameValueCollection config ) : void
name string /// Configuration name ///
config System.Collections.Specialized.NameValueCollection /// Configuration settings ///
리턴 void

IsUserInRole() 공개 메소드

Check to see if user is in a role
public IsUserInRole ( string username, string roleName ) : bool
username string The user name to search for.
roleName string The role to search in.
리턴 bool

RemoveUsersFromRoles() 공개 메소드

Removes all users in user array from all roles in role array
public RemoveUsersFromRoles ( string usernames, string roleNames ) : void
usernames string A string array of user names to be removed from the specified roles.
roleNames string A string array of role names to remove the specified user names from.
리턴 void

RoleExists() 공개 메소드

Checks to see if role exists
public RoleExists ( string roleName ) : bool
roleName string The name of the role to search for in the data source.
리턴 bool