HTTP API Toolkit HTTP API Toolkit
HTTP API Toolkit HTTP API Toolkit
DocFX + Singulink = ♥

Search Results for

    Constructor ShortLivedState

    ShortLivedState(IShortLivedStore, string, JsonTypeInfo<T>, TimeSpan, ILogger?)

    Initializes a new instance of the ShortLivedState<T> class.

    Declaration
    public ShortLivedState(IShortLivedStore store, string keyPrefix, JsonTypeInfo<T> typeInfo, TimeSpan lifetime, ILogger? logger = null)
    Parameters
    Type Name Description
    IShortLivedStore store

    The store.

    string keyPrefix

    The start of the keys, which keeps these states apart from all others, for example "myapp:setup-ticket:". The toolkit's own keys start with httpapi:.

    JsonTypeInfo<T> typeInfo

    The JSON type information of the state.

    TimeSpan lifetime

    How long each state is kept after it is added.

    ILogger logger

    The logger that a state that cannot be read is logged to, if any.

    Exceptions
    Type Condition
    ArgumentException

    keyPrefix is empty or starts with httpapi:.

    ArgumentOutOfRangeException

    lifetime is zero or negative.

    © Singulink. All rights reserved.