Class EventStore
Represents an implementation of IEventStore.
public class EventStore : IEventStore
- Inheritance
-
EventStore
- Implements
- Inherited Members
Constructors
EventStore(EventStoreName, EventStoreNamespaceName, IChronicleConnection, IClientArtifactsProvider, IEventTypeMigrators, ICorrelationIdAccessor, IConcurrencyScopeStrategies, ICausationManager, IIdentityProvider, IJsonSchemaGenerator, INamingPolicy, IServiceProvider, IClientArtifactsActivator, bool, JsonSerializerOptions, bool, ILoggerFactory)
Initializes a new instance of the EventStore class.
public EventStore(EventStoreName eventStoreName, EventStoreNamespaceName @namespace, IChronicleConnection connection, IClientArtifactsProvider clientArtifactsProvider, IEventTypeMigrators eventTypeMigrators, ICorrelationIdAccessor correlationIdAccessor, IConcurrencyScopeStrategies concurrencyScopeStrategies, ICausationManager causationManager, IIdentityProvider identityProvider, IJsonSchemaGenerator schemaGenerator, INamingPolicy namingPolicy, IServiceProvider serviceProvider, IClientArtifactsActivator artifactActivator, bool autoDiscoverAndRegister, JsonSerializerOptions jsonSerializerOptions, bool enableEventTypeGenerationValidation, ILoggerFactory loggerFactory)
Parameters
eventStoreNameEventStoreNameName of the event store.
namespaceEventStoreNamespaceNameNamespace for the event store.
connectionIChronicleConnectionCratis.Chronicle.Connections.IChronicleConnection for working with the connection to Chronicle.
clientArtifactsProviderIClientArtifactsProviderIClientArtifactsProvider for getting client artifacts.
eventTypeMigratorsIEventTypeMigratorsIEventTypeMigrators for getting event type migrators.
correlationIdAccessorICorrelationIdAccessorICorrelationIdAccessor for getting correlation.
concurrencyScopeStrategiesIConcurrencyScopeStrategiesIConcurrencyScopeStrategies for managing concurrency scopes.
causationManagerICausationManagerICausationManager for getting causation.
identityProviderIIdentityProviderIIdentityProvider for resolving identity for operations.
schemaGeneratorIJsonSchemaGeneratorIJsonSchemaGenerator for generating JSON schemas.
namingPolicyINamingPolicyINamingPolicy to use for converting names during serialization.
serviceProviderIServiceProviderIServiceProvider for getting instances of services.
artifactActivatorIClientArtifactsActivatorIClientArtifactsActivator for creating artifact instances.
autoDiscoverAndRegisterboolWhether to automatically discover and register artifacts.
jsonSerializerOptionsJsonSerializerOptionsJsonSerializerOptions for serialization.
enableEventTypeGenerationValidationboolWhether to enable event type generation chain validation. Defaults to false.
loggerFactoryILoggerFactoryILoggerFactory for creating loggers.
Properties
Connection
Gets the Cratis.Chronicle.Connections.IChronicleConnection used for the IEventStore.
public IChronicleConnection Connection { get; }
Property Value
- IChronicleConnection
Constraints
Gets the IConstraints for the event store.
public IConstraints Constraints { get; }
Property Value
EventLog
Gets the IEventLog event sequence.
public IEventLog EventLog { get; }
Property Value
EventTypes
Gets the IEventTypes for the event store.
public IEventTypes EventTypes { get; }
Property Value
FailedPartitions
Gets the IFailedPartitions for the event store.
public IFailedPartitions FailedPartitions { get; }
Property Value
Jobs
Gets the IJobs for the event store.
public IJobs Jobs { get; }
Property Value
Name
Gets the Name for the event store.
public EventStoreName Name { get; }
Property Value
Namespace
Gets the namespace for the event store.
public EventStoreNamespaceName Namespace { get; }
Property Value
Projections
Gets the IProjections for the event store.
public IProjections Projections { get; }
Property Value
Reactors
Gets the IReactors for the event store.
public IReactors Reactors { get; }
Property Value
ReadModels
Gets the IReadModels for the event store.
public IReadModels ReadModels { get; }
Property Value
Reducers
Gets the IReducers for the event store.
public IReducers Reducers { get; }
Property Value
Seeding
Gets the IEventSeeding for the event store.
public IEventSeeding Seeding { get; }
Property Value
Subscriptions
Gets the IEventStoreSubscriptions for the event store.
public IEventStoreSubscriptions Subscriptions { get; }
Property Value
UnitOfWorkManager
Gets the IClientArtifactsProvider for the event store.
public IUnitOfWorkManager UnitOfWorkManager { get; }
Property Value
Webhooks
Gets the IWebhooks for the event store.
public IWebhooks Webhooks { get; }
Property Value
Methods
DiscoverAll()
Discover all artifacts for the event store.
public Task DiscoverAll()
Returns
- Task
Awaitable task.
GetEventSequence(EventSequenceId)
Get an event sequence by id.
public IEventSequence GetEventSequence(EventSequenceId id)
Parameters
idEventSequenceIdThe identifier of the event sequence to get.
Returns
- IEventSequence
IEventSequence instance.
GetNamespaces(CancellationToken)
List namespaces in the event store.
public Task<IEnumerable<EventStoreNamespaceName>> GetNamespaces(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenOptional CancellationToken.
Returns
- Task<IEnumerable<EventStoreNamespaceName>>
An asynchronous enumerable for all namespace names.
RegisterAll()
Register all artifacts for the event store.
public Task RegisterAll()
Returns
- Task
Awaitable task.