Interface IAccountManager
Предоставляет методы для работы с учётными записями.
Assembly: Lers.Server.System.dll
Syntax
public interface IAccountManager
Methods
CreateAccount(Account, String)
Declaration
IAccount CreateAccount(Account param, string password)
Parameters
| Type |
Name |
Description |
| Lers.Models.Account |
param |
|
| System.String |
password |
|
Returns
Delete(IAccount)
Declaration
void Delete(IAccount account)
Parameters
GetAllowedAccounts(IAccount, Nullable<Int32>, Nullable<Int32>)
Declaration
IEnumerable<IAccount> GetAllowedAccounts(IAccount currentAccount, int? accountGroupId, int? accountId)
Parameters
| Type |
Name |
Description |
| IAccount |
currentAccount |
|
| System.Nullable<System.Int32> |
accountGroupId |
|
| System.Nullable<System.Int32> |
accountId |
|
Returns
Возвращает учётные записи с доступом к точке учёта.
Declaration
IEnumerable<IAccount> GetAllowedForMeasurePoint(IMeasurePoint measurePoint)
Parameters
Returns
GetAllowedForNode(INode)
Возвращает учётные записи с доступом к объекту учёта.
Declaration
IEnumerable<IAccount> GetAllowedForNode(INode node)
Parameters
| Type |
Name |
Description |
| INode |
node |
|
Returns
GetAuthorized(ClaimsPrincipal)
Возвращает авторизованную учётную запись пользователя.
Declaration
IAuthorizedAccount GetAuthorized(ClaimsPrincipal claims)
Parameters
| Type |
Name |
Description |
| System.Security.Claims.ClaimsPrincipal |
claims |
|
Returns
GetById(EntityIdentifier)
Возвращает учётную запись по её идентификатору.
Declaration
IAccount GetById(EntityIdentifier accountId)
Parameters
Returns
GetById(EntityIdentifier<Account>)
Возвращает учётную запись по её идентификатору.
Declaration
IAccount GetById(EntityIdentifier<Account> accountId)
Parameters
Returns
GetByIdChecked(IAccount, EntityIdentifier)
Возвращает учётную запись по её уникальному идентификатору.
Если учётная запись не найдена, выдаётся исключение ItemNotFoundException .
Declaration
IAccount GetByIdChecked(IAccount currentAccount, EntityIdentifier accountId)
Parameters
| Type |
Name |
Description |
| IAccount |
currentAccount |
Учётная запись, запрашивающая информацию.
|
| EntityIdentifier |
accountId |
Уникальный идентификатор учётной записи.
|
Returns
GetByIdChecked(IAccount, EntityIdentifier<Account>)
Возвращает учётную запись по её уникальному идентификатору.
Если учётная запись не найдена, выдаётся исключение ItemNotFoundException .
Declaration
IAccount GetByIdChecked(IAccount currentAccount, EntityIdentifier<Account> accountId)
Parameters
| Type |
Name |
Description |
| IAccount |
currentAccount |
Учётная запись, запрашивающая информацию.
|
| EntityIdentifier<Lers.Models.Account> |
accountId |
Уникальный идентификатор учётной записи.
|
Returns
GetByIdChecked(Int32)
Возвращает учётную запись по идентификатору с проверкой существования.
Declaration
IAccount GetByIdChecked(int accountId)
Parameters
| Type |
Name |
Description |
| System.Int32 |
accountId |
|
Returns
GetByLogin(String)
Возвращает учётную запись по логину.
Declaration
IAccount GetByLogin(string accountLogin)
Parameters
| Type |
Name |
Description |
| System.String |
accountLogin |
|
Returns
GetByTrusteeId(EntityIdentifier)
Возвращает учётную запись по идентификатору объекта безопасности.
Declaration
IAccount GetByTrusteeId(EntityIdentifier trusteeId)
Parameters
Returns
GetByWindowsSid(String)
Возвращает учётную запись по идентификатору безопасности Windows.
Declaration
IAccount GetByWindowsSid(string windowsSid)
Parameters
| Type |
Name |
Description |
| System.String |
windowsSid |
|
Returns
GetCachedById(EntityIdentifier<Account>)
Возвращает учётную запись из кэша.
Declaration
IAccount GetCachedById(EntityIdentifier<Account> id)
Parameters
Returns
GetList(Nullable<Int32>)
Возвращает список учётных записей.
Declaration
List<IAccount> GetList(int? groupId = null)
Parameters
| Type |
Name |
Description |
| System.Nullable<System.Int32> |
groupId |
|
Returns
GetListByIds(Nullable<IEnumerable<Int32>>)
Возвращает список учетных записей по их идентификатором.
Declaration
IEnumerable<IAccount> GetListByIds(IEnumerable<int>? accountIds = null)
Parameters
| Type |
Name |
Description |
| System.Nullable<IEnumerable<System.Int32>> |
accountIds |
Список идентификаторов требуемых учётных записей.
|
Returns
| Type |
Description |
| IEnumerable<IAccount> |
Возвращает все учетные записи, если список идентификаторов равен null.
|
GetListByNode(Int32)
Получает список учетных записей, имеющих непосредственный доступ к объекту учета (без наследования групп объектов учета).
Declaration
IList<IAccount> GetListByNode(int nodeId)
Parameters
| Type |
Name |
Description |
| System.Int32 |
nodeId |
Идентификатор объекта учета.
|
Returns
| Type |
Description |
| IList<IAccount> |
Список учетных записей.
|
GetListChecked(IAccount, Nullable<Int32>)
Возвращает список учётных записей, разрешённых указанному пользователю.
Declaration
IEnumerable<IAccount> GetListChecked(IAccount doer, int? groupId)
Parameters
| Type |
Name |
Description |
| IAccount |
doer |
|
| System.Nullable<System.Int32> |
groupId |
|
Returns
GetNodeGrantedAccountsThroughGroups(INode)
Возвращает список учётных записей, имеющих доступ к объекту учёта через группы.
Declaration
IList<IAccount> GetNodeGrantedAccountsThroughGroups(INode node)
Parameters
| Type |
Name |
Description |
| INode |
node |
|
Returns
| Type |
Description |
| IList<IAccount> |
Список учетных записей, имеющих доступ к объекту учёта через группы.
|
GetServicemanById(EntityIdentifier)
Возвращает учётную запись обслуживающего.
Declaration
Account GetServicemanById(EntityIdentifier accountId)
Parameters
| Type |
Name |
Description |
| EntityIdentifier |
accountId |
Идентификатор записи, которую необходимо вернуть.
|
Returns
| Type |
Description |
| Lers.Models.Account |
Учётную запись обслуживающего, либо null если запись
не найдена или не принадлежит группе обслуживающих.
|
GetServicemen()
Возвращает список учётных записей, входящих в группу 'Обслуживающие'.
Declaration
IEnumerable<Serviceman> GetServicemen()
Returns
| Type |
Description |
| IEnumerable<Lers.Models.Serviceman> |
|
GetTaskMailList(EntityIdentifier<ServerTask>)
Возвращает список рассылки для задания автоформирования отчёта.
Declaration
IEnumerable<AccountMailListEntry> GetTaskMailList(EntityIdentifier<ServerTask> identifier)
Parameters
Returns
| Type |
Description |
| IEnumerable<Lers.Administration.AccountMailListEntry> |
|
SaveAccountNotifications(IAccount, IEnumerable<NotificationTypeModel>)
Сохраняет параметры уведомлений для учётной записи.
Declaration
void SaveAccountNotifications(IAccount account, IEnumerable<NotificationTypeModel> notificationParameters)
Parameters
| Type |
Name |
Description |
| IAccount |
account |
|
| IEnumerable<Lers.Models.NotificationTypeModel> |
notificationParameters |
|
SaveStateParameters(IAccount, AccountStateParameters)
Устанавливает параметры расчёта состояния для учётной записи.
Declaration
void SaveStateParameters(IAccount account, AccountStateParameters param)
Parameters
| Type |
Name |
Description |
| IAccount |
account |
Учётная запись для изменения параметров.
|
| Lers.Models.AccountStateParameters |
param |
Параметры состояния.
|
Update(IAccount, Account)
Обновляет свойства учётной записи.
Declaration
void Update(IAccount account, Account newSettings)
Parameters
| Type |
Name |
Description |
| IAccount |
account |
|
| Lers.Models.Account |
newSettings |
|
Extension Methods