Table of Contents
API reference

Class InMemoryDiscordIngressPendingStateStore

Namespace
DisCatSharp.Hosting.AspNetCore.Ingress
Assembly
DisCatSharp.Hosting.AspNetCore.dll

Default in-memory implementation for pending ingress state.

public sealed class InMemoryDiscordIngressPendingStateStore : IDiscordIngressPendingStateStore
Inheritance
InMemoryDiscordIngressPendingStateStore
Implements
Inherited Members

Remarks

This implementation is process-local and is best suited to single-node hosting scenarios. Replace it with a distributed store when callback state must survive app restarts or be shared across multiple instances.

Constructors

InMemoryDiscordIngressPendingStateStore(IOptions<DiscordWebIngressOptions>, TimeProvider)

Initializes a new instance of the InMemoryDiscordIngressPendingStateStore class.

Methods

ConsumeAsync(string, CancellationToken)

Resolves and removes an existing pending state entry.

GetAsync(string, CancellationToken)

Resolves an existing pending state entry without removing it.

RemoveAsync(string, CancellationToken)

Removes a pending state entry when present.

StoreAsync(DiscordIngressPendingState, CancellationToken)

Stores or replaces a pending state entry.