Skip to content

sharedlibrarycoreinterfaces IMetaServiceV2

RaidMax edited this page May 21, 2023 · 1 revision

IMetaServiceV2 Public interface

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph SharedLibraryCore.Interfaces
  SharedLibraryCore.Interfaces.IMetaServiceV2[[IMetaServiceV2]]
  class SharedLibraryCore.Interfaces.IMetaServiceV2 interfaceStyle;
  end
Loading

Members

Methods

Public methods

Returns Name
void AddRuntimeMeta(MetaType metaKey, Func<T, CancellationToken, Task<IEnumerable<TReturn>>> metaAction)
Task DecrementPersistentMeta(string metaKey, int decrementAmount, int clientId, CancellationToken token)
decrements meta value and persists to the database if the meta value does not already exist it will be set to the decrement amount the assumption is made that the existing value is Int32
Task<EFMeta> GetPersistentMeta(...)
retrieves meta entry
Task<EFMeta> GetPersistentMetaByLookup(string metaKey, string lookupKey, int clientId, CancellationToken token)
retrieves meta entry by with associated lookup value as string
Task<T> GetPersistentMetaValue(...)
Task<IEnumerable<IClientMeta>> GetRuntimeMeta(...)
retrieves all the runtime meta information for given client idea
Task IncrementPersistentMeta(string metaKey, int incrementAmount, int clientId, CancellationToken token)
increments meta value and persists to the database if the meta value does not already exist it will be set to the increment amount the assumption is made that the existing value is Int32
Task RemovePersistentMeta(...)
removes meta key with given value
Task SetPersistentMeta(...)
adds or updates meta key and value to the database as simple string
Task SetPersistentMetaForLookupKey(string metaKey, string lookupKey, int lookupId, int clientId, CancellationToken token)
Sets meta key to a linked lookup key and id
Task SetPersistentMetaValue(...)

Details

Methods

SetPersistentMeta [1/2]

Source code

public Task SetPersistentMeta(string metaKey, string metaValue, int clientId, CancellationToken token)
Arguments
Type Name Description
string metaKey key of meta data
string metaValue value of the meta data
int clientId id of the client to save the meta for
CancellationToken token
Summary

adds or updates meta key and value to the database as simple string

Returns

SetPersistentMetaValue [1/2]

Source code

public Task SetPersistentMetaValue<T>(string metaKey, T metaValue, int clientId, CancellationToken token)
where T : 
Arguments
Type Name Description
string metaKey
T metaValue
int clientId
CancellationToken token

SetPersistentMetaForLookupKey

Source code

public Task SetPersistentMetaForLookupKey(string metaKey, string lookupKey, int lookupId, int clientId, CancellationToken token)
Arguments
Type Name Description
string metaKey Key for the client meta
string lookupKey Key of the global lookup meta
int lookupId Id in the list of lookup values
int clientId id of the client
CancellationToken token
Summary

Sets meta key to a linked lookup key and id

Returns

IncrementPersistentMeta

Source code

public Task IncrementPersistentMeta(string metaKey, int incrementAmount, int clientId, CancellationToken token)
Arguments
Type Name Description
string metaKey key of meta data
int incrementAmount value to increment by
int clientId id of the client to save the meta for
CancellationToken token
Summary

increments meta value and persists to the database if the meta value does not already exist it will be set to the increment amount the assumption is made that the existing value is Int32

Returns

DecrementPersistentMeta

Source code

public Task DecrementPersistentMeta(string metaKey, int decrementAmount, int clientId, CancellationToken token)
Arguments
Type Name Description
string metaKey key of meta data
int decrementAmount value to increment by
int clientId id of the client to save the meta for
CancellationToken token
Summary

decrements meta value and persists to the database if the meta value does not already exist it will be set to the decrement amount the assumption is made that the existing value is Int32

Returns

GetPersistentMeta [1/2]

Source code

public Task<EFMeta> GetPersistentMeta(string metaKey, int clientId, CancellationToken token)
Arguments
Type Name Description
string metaKey
int clientId
CancellationToken token
Summary

retrieves meta entry

Returns

GetPersistentMetaValue [1/2]

Source code

public Task<T> GetPersistentMetaValue<T>(string metaKey, int clientId, CancellationToken token)
where T : 
Arguments
Type Name Description
string metaKey
int clientId
CancellationToken token

GetPersistentMetaByLookup

Source code

public Task<EFMeta> GetPersistentMetaByLookup(string metaKey, string lookupKey, int clientId, CancellationToken token)
Arguments
Type Name Description
string metaKey
string lookupKey
int clientId
CancellationToken token
Summary

retrieves meta entry by with associated lookup value as string

Returns

RemovePersistentMeta [1/2]

Source code

public Task RemovePersistentMeta(string metaKey, int clientId, CancellationToken token)
Arguments
Type Name Description
string metaKey key of meta data
int clientId client to delete the meta for
CancellationToken token
Summary

removes meta key with given value

Returns

SetPersistentMeta [2/2]

Source code

public Task SetPersistentMeta(string metaKey, string metaValue, CancellationToken token)
Arguments
Type Name Description
string metaKey key of meta data
string metaValue value of the meta data
CancellationToken token
Summary

adds or updates meta key and value to the database

Returns

SetPersistentMetaValue [2/2]

Source code

public Task SetPersistentMetaValue<T>(string metaKey, T metaValue, CancellationToken token)
where T : 
Arguments
Type Name Description
string metaKey
T metaValue
CancellationToken token

RemovePersistentMeta [2/2]

Source code

public Task RemovePersistentMeta(string metaKey, CancellationToken token)
Arguments
Type Name Description
string metaKey key of the meta data
CancellationToken token
Summary

removes meta key with given value

Returns

GetPersistentMeta [2/2]

Source code

public Task<EFMeta> GetPersistentMeta(string metaKey, CancellationToken token)
Arguments
Type Name Description
string metaKey key to retrieve values for
CancellationToken token
Summary

retrieves collection of meta for given key

Returns

GetPersistentMetaValue [2/2]

Source code

public Task<T> GetPersistentMetaValue<T>(string metaKey, CancellationToken token)
where T : 
Arguments
Type Name Description
string metaKey
CancellationToken token

AddRuntimeMeta

Source code

public void AddRuntimeMeta<T, TReturn>(MetaType metaKey, Func<T, CancellationToken, Task<IEnumerable<TReturn>>> metaAction)
where T : PaginationRequest
where TReturn : IClientMeta
Arguments
Type Name Description
MetaType metaKey
Func<T, CancellationToken, Task<IEnumerable<TReturn>>> metaAction

GetRuntimeMeta [1/2]

Source code

public Task<IEnumerable<IClientMeta>> GetRuntimeMeta(ClientPaginationRequest request, CancellationToken token)
Arguments
Type Name Description
ClientPaginationRequest request request information
CancellationToken token
Summary

retrieves all the runtime meta information for given client idea

Returns

GetRuntimeMeta [2/2]

Source code

public Task<IEnumerable<T>> GetRuntimeMeta<T>(ClientPaginationRequest request, MetaType metaType, CancellationToken token)
where T : IClientMeta
Arguments
Type Name Description
ClientPaginationRequest request
MetaType metaType
CancellationToken token

Generated with ModularDoc

Clone this wiki locally