C# Класс Rock.Security.Role

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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

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

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

Caches the key.

Role ( ) : System

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

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

AllRoles() публичный статический Метод

Returns a list of all the possible Roles
public static AllRoles ( ) : List
Результат List

Flush() публичный статический Метод

Removes role from cache
public static Flush ( int id ) : void
id int The id.
Результат void

GetOrAddExisting() публичный статический Метод

Gets the or add existing.
public static GetOrAddExisting ( string key, Func valueFactory ) : Role
key string The key.
valueFactory Func The value factory.
Результат Role

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

Is user in role
public IsPersonInRole ( System.Guid personGuid ) : bool
personGuid System.Guid The person unique identifier.
Результат bool

LoadById() публичный статический Метод

Loads the by identifier.
public static LoadById ( int id ) : Role
id int The identifier.
Результат Role

Read() публичный статический Метод

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.
Результат Role