C# Class Rock.Security.Role

Afficher le fichier Open project: NewSpring/Rock Class Usage Examples

Méthodes publiques

Méthode Description
AllRoles ( ) : List

Returns a list of all the possible Roles

Flush ( int id ) : void

Removes role from cache

GetOrAddExisting ( string key, Func valueFactory ) : Role

Gets the or add existing.

IsPersonInRole ( System.Guid personGuid ) : bool

Is user in role

LoadById ( int id ) : Role

Loads the by identifier.

Read ( int id ) : Role

Returns Role object from cache. If role does not already exist in cache, it will be read and added to cache

Private Methods

Méthode Description
CacheKey ( int id ) : string

Caches the key.

Role ( ) : System

Use Static Read() method to instantiate a new Role object

Method Details

AllRoles() public static méthode

Returns a list of all the possible Roles
public static AllRoles ( ) : List
Résultat List

Flush() public static méthode

Removes role from cache
public static Flush ( int id ) : void
id int The id.
Résultat void

GetOrAddExisting() public static méthode

Gets the or add existing.
public static GetOrAddExisting ( string key, Func valueFactory ) : Role
key string The key.
valueFactory Func The value factory.
Résultat Role

IsPersonInRole() public méthode

Is user in role
public IsPersonInRole ( System.Guid personGuid ) : bool
personGuid System.Guid The person unique identifier.
Résultat bool

LoadById() public static méthode

Loads the by identifier.
public static LoadById ( int id ) : Role
id int The identifier.
Résultat Role

Read() public static méthode

Returns Role object from cache. If role does not already exist in cache, it will be read and added to cache
public static Read ( int id ) : Role
id int The id.
Résultat Role