Interface IChronicleClient
- Namespace
- Cratis.Chronicle
- Assembly
- Cratis.Chronicle.dll
Defines the Cratis client API surface.
public interface IChronicleClient
- Extension Methods
Properties
CausationManager
Gets the ICausationManager for the client.
ICausationManager CausationManager { get; }
Property Value
Options
Gets the ChronicleOptions for the client.
ChronicleOptions Options { get; }
Property Value
Methods
EvictEventStores()
Evict every cached IEventStore, unsubscribing each one's RegisterAll
handler from the shared connection lifecycle.
void EvictEventStores()
Remarks
Used to release per-event-store subscriptions when the calling environment needs to
fully reset client state without disposing the client itself — for example, between
integration test classes that share an IChronicleClient instance. Without
this, every IEventStore ever created stays subscribed to OnConnected and
re-runs RegisterAll on subsequent reconnects, causing the kernel to receive a
fanout of concurrent Ensure calls for the same event-store name.
GetEventStore(EventStoreName, EventStoreNamespaceName?)
Get an event store by name and optional namespace.
Task<IEventStore> GetEventStore(EventStoreName name, EventStoreNamespaceName? @namespace = null)
Parameters
nameEventStoreNameName of the event store to get.
namespaceEventStoreNamespaceNameOptional namespace.
Returns
Remarks
If no namespace is specified, the default namespace will be used.
GetEventStores(CancellationToken)
List all the event stores.
Task<IEnumerable<EventStoreName>> GetEventStores(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenOptional CancellationToken.
Returns
- Task<IEnumerable<EventStoreName>>
An asynchronous enumerable.