using System.Collections.Immutable; using Connected.Security; using Connected.Security.Identity; using Connected.ServiceModel; using Connected.Services; using Connected.Services.Annotations; namespace Common.Security.Identity; internal class RoleService : EntityService, IRoleService { public RoleService(IContext context) : base(context) { } [ServiceAuthorization(SecurityClaims.SecurityDelete)] public async Task Delete(PrimaryKeyArgs args) { await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityAdd)] public async Task Insert(RoleArgs args) { return await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityRead)] public async Task?> Query() { return await Invoke(GetOperation(), Dto.Empty); } [ServiceAuthorization(SecurityClaims.SecurityRead)] public async Task?> Query(PrimaryKeyListArgs args) { return await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityRead)] public async Task Select(PrimaryKeyArgs args) { return await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityRead)] public async Task Select(NameArgs args) { return await Invoke(GetOperation(), args); } [ServiceAuthorization(SecurityClaims.SecurityModify)] public async Task Update(RoleUpdateArgs args) { await Invoke(GetOperation(), args); } }