1 sharedlibrarycoreservices ClientService
RaidMax edited this page 2023-05-20 22:09:21 -05:00

ClientService Public class

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph SharedLibraryCore.Services
  SharedLibraryCore.Services.ClientService[[ClientService]]
  end
  subgraph SharedLibraryCore.Interfaces
  SharedLibraryCore.Interfaces.IEntityService_1[[IEntityService< T >]]
  class SharedLibraryCore.Interfaces.IEntityService_1 interfaceStyle;

  SharedLibraryCore.Interfaces.IResourceQueryHelper_2[[IResourceQueryHelper< QueryType,ResultType >]]
  class SharedLibraryCore.Interfaces.IResourceQueryHelper_2 interfaceStyle;

  end
SharedLibraryCore.Interfaces.IEntityService_1 --> SharedLibraryCore.Services.ClientService
SharedLibraryCore.Interfaces.IResourceQueryHelper_2 --> SharedLibraryCore.Services.ClientService

Members

Methods

Public methods

Returns Name
Task<bool> CanBeAutoFlagged(int clientId)
indicates if the given clientid can be autoflagged
Task<EFClient> Create(EFClient entity)
Task<EFClient> Delete(EFClient entity)
Task<IList<EFClient>> Find(Func<EFClient, bool> e)
Task<IList<PlayerInfo>> FindClientsByIdentifier(string identifier)
Task<EFClient> Get(int entityId)
Task<EFClient> GetClientForLogin(int clientId)
Task<string> GetClientNameById(int clientId)
Task<int> GetClientReportCount(int clientId)
retrieves the number of times the given client id has been reported
Task<int> GetOwnerCount()
retrieves the number of owners
(client level is owner)
Task<IList<EFClient>> GetOwners()
Task<List<EFClient>> GetPrivilegedClients(bool includeName)
Task<int> GetRecentClientCount()
Returns the number of clients seen today
Task<IList<PlayerInfo>> GetRecentClients(PaginationRequest request)
gets the 10 most recently added clients to IW4MAdmin
Task<int> GetTotalClientsAsync()
Task<EFClient> GetUnique(long entityAttribute, object altKey)
Task<bool> HasOwnerAsync(CancellationToken token)
Task<ResourceQueryHelperResult<FindClientResult>> QueryResource(FindClientRequest query)
find clients matching the given query
Task UnlinkClient(int clientId)
Unlinks shared GUID account into its own separate account
Task<EFClient> Update(EFClient temporalClient)
Task UpdateAlias(EFClient temporalClient)
Task UpdateLevel(Permission newPermission, EFClient temporalClient, EFClient origin)

Details

Inheritance

Constructors

ClientService

Source code

public ClientService(ILogger<ClientService> logger, IDatabaseContextFactory databaseContextFactory, ApplicationConfiguration appConfig, IGeoLocationService geoLocationService)
Arguments
Type Name Description
ILogger<ClientService> logger
IDatabaseContextFactory databaseContextFactory
ApplicationConfiguration appConfig
IGeoLocationService geoLocationService

Methods

Create

Source code

public virtual async Task<EFClient> Create(EFClient entity)
Arguments
Type Name Description
EFClient entity

Delete

Source code

public virtual Task<EFClient> Delete(EFClient entity)
Arguments
Type Name Description
EFClient entity

Find

Source code

public virtual Task<IList<EFClient>> Find(Func<EFClient, bool> e)
Arguments
Type Name Description
Func<EFClient, bool> e

Get

public virtual async Task<EFClient> Get(int entityId)
Arguments
Type Name Description
int entityId

GetUnique

public virtual async Task<EFClient> GetUnique(long entityAttribute, object altKey)
Arguments
Type Name Description
long entityAttribute
object altKey

Update

public virtual async Task<EFClient> Update(EFClient temporalClient)
Arguments
Type Name Description
EFClient temporalClient

QueryResource

Source code

public virtual async Task<ResourceQueryHelperResult<FindClientResult>> QueryResource(FindClientRequest query)
Arguments
Type Name Description
FindClientRequest query query filters
Summary

find clients matching the given query

Returns

UpdateLevel

Source code

public virtual async Task UpdateLevel(Permission newPermission, EFClient temporalClient, EFClient origin)
Arguments
Type Name Description
Permission newPermission
EFClient temporalClient
EFClient origin

UpdateAlias

Source code

public async Task UpdateAlias(EFClient temporalClient)
Arguments
Type Name Description
EFClient temporalClient

GetClientReportCount

Source code

public async Task<int> GetClientReportCount(int clientId)
Arguments
Type Name Description
int clientId client id to search for report counts of
Summary

retrieves the number of times the given client id has been reported

Returns

CanBeAutoFlagged

Source code

public async Task<bool> CanBeAutoFlagged(int clientId)
Arguments
Type Name Description
int clientId
Summary

indicates if the given clientid can be autoflagged

Returns

UnlinkClient

Source code

public async Task UnlinkClient(int clientId)
Arguments
Type Name Description
int clientId
Summary

Unlinks shared GUID account into its own separate account

Returns

GetOwners

Source code

public async Task<IList<EFClient>> GetOwners()

HasOwnerAsync

Source code

public async Task<bool> HasOwnerAsync(CancellationToken token)
Arguments
Type Name Description
CancellationToken token

GetOwnerCount

Source code

public virtual async Task<int> GetOwnerCount()
Summary

retrieves the number of owners (client level is owner)

Returns

GetClientForLogin

Source code

public async Task<EFClient> GetClientForLogin(int clientId)
Arguments
Type Name Description
int clientId

GetPrivilegedClients

Source code

public async Task<List<EFClient>> GetPrivilegedClients(bool includeName)
Arguments
Type Name Description
bool includeName

FindClientsByIdentifier

Source code

public async Task<IList<PlayerInfo>> FindClientsByIdentifier(string identifier)
Arguments
Type Name Description
string identifier

GetTotalClientsAsync

Source code

public async Task<int> GetTotalClientsAsync()

GetRecentClientCount

Source code

public async Task<int> GetRecentClientCount()
Summary

Returns the number of clients seen today

Returns

GetRecentClients

Source code

public async Task<IList<PlayerInfo>> GetRecentClients(PaginationRequest request)
Arguments
Type Name Description
PaginationRequest request
Summary

gets the 10 most recently added clients to IW4MAdmin

Returns

GetClientNameById

Source code

public async Task<string> GetClientNameById(int clientId)
Arguments
Type Name Description
int clientId

Generated with ModularDoc