Class CrudHandler<T>
Specializes CRUD operations for a specific type T.
Provides a base implementation for CRUD operations, allowing derived classes to implement specific logic.
Inheritance
CrudHandler<T>
Assembly: Glitch9.IO.dll
Syntax
public abstract class CrudHandler<T>
Type Parameters
| Name |
Description |
| T |
Type of the object to handle CRUD operations for.
This type must be compatible with the REST API being used.
|
Constructors
|
Edit this page
View Source
CrudHandler(ILogger)
Declaration
protected CrudHandler(ILogger logger)
Parameters
| Type |
Name |
Description |
| ILogger |
logger |
|
Fields
|
Edit this page
View Source
logger
Declaration
protected readonly ILogger logger
Field Value
|
Edit this page
View Source
modelName
Declaration
protected readonly string modelName
Field Value
Methods
|
Edit this page
View Source
CreateAsync(CancellationToken)
Declaration
public UniTask<T> CreateAsync(CancellationToken ct = default)
Parameters
Returns
| Type |
Description |
| UniTask<T> |
|
|
Edit this page
View Source
CreateAsyncINTERNAL(CancellationToken)
Declaration
protected abstract UniTask<T> CreateAsyncINTERNAL(CancellationToken ct)
Parameters
Returns
| Type |
Description |
| UniTask<T> |
|
|
Edit this page
View Source
DeleteAsync(string, CancellationToken)
Declaration
public UniTask<bool> DeleteAsync(string id, CancellationToken ct = default)
Parameters
Returns
| Type |
Description |
| UniTask<bool> |
|
|
Edit this page
View Source
DeleteAsyncINTERNAL(string, CancellationToken)
Declaration
protected abstract UniTask<bool> DeleteAsyncINTERNAL(string id, CancellationToken ct)
Parameters
Returns
| Type |
Description |
| UniTask<bool> |
|
|
Edit this page
View Source
QueryAsync(CancellationToken)
Declaration
public UniTask<T[]> QueryAsync(CancellationToken ct = default)
Parameters
Returns
| Type |
Description |
| UniTask<T[]> |
|
|
Edit this page
View Source
QueryAsyncINTERNAL(CancellationToken)
Declaration
protected abstract UniTask<T[]> QueryAsyncINTERNAL(CancellationToken ct)
Parameters
Returns
| Type |
Description |
| UniTask<T[]> |
|
|
Edit this page
View Source
RetrieveAsync(string, bool, CancellationToken)
Declaration
public UniTask<T> RetrieveAsync(string id, bool createIfNotFound, CancellationToken ct = default)
Parameters
Returns
| Type |
Description |
| UniTask<T> |
|
|
Edit this page
View Source
RetrieveAsync(string, CancellationToken)
Declaration
public UniTask<T> RetrieveAsync(string id, CancellationToken ct = default)
Parameters
Returns
| Type |
Description |
| UniTask<T> |
|
|
Edit this page
View Source
RetrieveAsyncINTERNAL(string, CancellationToken)
Declaration
protected abstract UniTask<T> RetrieveAsyncINTERNAL(string id, CancellationToken ct)
Parameters
Returns
| Type |
Description |
| UniTask<T> |
|
|
Edit this page
View Source
UpdateAsync(string, CancellationToken)
Declaration
public UniTask<T> UpdateAsync(string id, CancellationToken ct = default)
Parameters
Returns
| Type |
Description |
| UniTask<T> |
|
|
Edit this page
View Source
UpdateAsyncINTERNAL(string, CancellationToken)
Declaration
protected abstract UniTask<T> UpdateAsyncINTERNAL(string id, CancellationToken ct)
Parameters
Returns
| Type |
Description |
| UniTask<T> |
|
Events
|
Edit this page
View Source
OnCreated
Declaration
public event Action<T> OnCreated
Event Type
|
Edit this page
View Source
OnDeleted
Declaration
public event Action<bool> OnDeleted
Event Type
|
Edit this page
View Source
OnQueried
Declaration
public event Action<T[]> OnQueried
Event Type
|
Edit this page
View Source
OnRetrieved
Declaration
public event Action<T> OnRetrieved
Event Type
|
Edit this page
View Source
OnUpdated
Declaration
public event Action<T> OnUpdated
Event Type
Extension Methods