Search Results for

    Show / Hide Table of Contents

    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
    object
    CrudHandler<T>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.IO.Networking.RESTApi
    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
    Type Description
    ILogger
    | Edit this page View Source

    modelName

    Declaration
    protected readonly string modelName
    Field Value
    Type Description
    string

    Methods

    | Edit this page View Source

    CreateAsync(CancellationToken)

    Declaration
    public UniTask<T> CreateAsync(CancellationToken ct = default)
    Parameters
    Type Name Description
    CancellationToken ct
    Returns
    Type Description
    UniTask<T>
    | Edit this page View Source

    CreateAsyncINTERNAL(CancellationToken)

    Declaration
    protected abstract UniTask<T> CreateAsyncINTERNAL(CancellationToken ct)
    Parameters
    Type Name Description
    CancellationToken ct
    Returns
    Type Description
    UniTask<T>
    | Edit this page View Source

    DeleteAsync(string, CancellationToken)

    Declaration
    public UniTask<bool> DeleteAsync(string id, CancellationToken ct = default)
    Parameters
    Type Name Description
    string id
    CancellationToken ct
    Returns
    Type Description
    UniTask<bool>
    | Edit this page View Source

    DeleteAsyncINTERNAL(string, CancellationToken)

    Declaration
    protected abstract UniTask<bool> DeleteAsyncINTERNAL(string id, CancellationToken ct)
    Parameters
    Type Name Description
    string id
    CancellationToken ct
    Returns
    Type Description
    UniTask<bool>
    | Edit this page View Source

    QueryAsync(CancellationToken)

    Declaration
    public UniTask<T[]> QueryAsync(CancellationToken ct = default)
    Parameters
    Type Name Description
    CancellationToken ct
    Returns
    Type Description
    UniTask<T[]>
    | Edit this page View Source

    QueryAsyncINTERNAL(CancellationToken)

    Declaration
    protected abstract UniTask<T[]> QueryAsyncINTERNAL(CancellationToken ct)
    Parameters
    Type Name Description
    CancellationToken ct
    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
    Type Name Description
    string id
    bool createIfNotFound
    CancellationToken ct
    Returns
    Type Description
    UniTask<T>
    | Edit this page View Source

    RetrieveAsync(string, CancellationToken)

    Declaration
    public UniTask<T> RetrieveAsync(string id, CancellationToken ct = default)
    Parameters
    Type Name Description
    string id
    CancellationToken ct
    Returns
    Type Description
    UniTask<T>
    | Edit this page View Source

    RetrieveAsyncINTERNAL(string, CancellationToken)

    Declaration
    protected abstract UniTask<T> RetrieveAsyncINTERNAL(string id, CancellationToken ct)
    Parameters
    Type Name Description
    string id
    CancellationToken ct
    Returns
    Type Description
    UniTask<T>
    | Edit this page View Source

    UpdateAsync(string, CancellationToken)

    Declaration
    public UniTask<T> UpdateAsync(string id, CancellationToken ct = default)
    Parameters
    Type Name Description
    string id
    CancellationToken ct
    Returns
    Type Description
    UniTask<T>
    | Edit this page View Source

    UpdateAsyncINTERNAL(string, CancellationToken)

    Declaration
    protected abstract UniTask<T> UpdateAsyncINTERNAL(string id, CancellationToken ct)
    Parameters
    Type Name Description
    string id
    CancellationToken ct
    Returns
    Type Description
    UniTask<T>

    Events

    | Edit this page View Source

    OnCreated

    Declaration
    public event Action<T> OnCreated
    Event Type
    Type Description
    Action<T>
    | Edit this page View Source

    OnDeleted

    Declaration
    public event Action<bool> OnDeleted
    Event Type
    Type Description
    Action<bool>
    | Edit this page View Source

    OnQueried

    Declaration
    public event Action<T[]> OnQueried
    Event Type
    Type Description
    Action<T[]>
    | Edit this page View Source

    OnRetrieved

    Declaration
    public event Action<T> OnRetrieved
    Event Type
    Type Description
    Action<T>
    | Edit this page View Source

    OnUpdated

    Declaration
    public event Action<T> OnUpdated
    Event Type
    Type Description
    Action<T>

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation