CQRS.NET  4.0
A lightweight enterprise Function as a Service (FaaS) framework to write function based serverless and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.
Cqrs.EventStore.EventStore< TAuthenticationToken > Class Template Reference

A Greg Young Event Store based EventStore<TAuthenticationToken>. More...

+ Inheritance diagram for Cqrs.EventStore.EventStore< TAuthenticationToken >:

Public Member Functions

 EventStore (IEventBuilder< TAuthenticationToken > eventBuilder, IEventDeserialiser< TAuthenticationToken > eventDeserialiser, IEventStoreConnectionHelper eventStoreConnectionHelper)
 Instantiates a new instance of EventStore<TAuthenticationToken>. More...
 
void Save< T > (IEvent< TAuthenticationToken > @event)
 Saves the provided event . More...
 
void Save (Type aggregateRootType, IEvent< TAuthenticationToken > @event)
 Saves the provided event . More...
 
IEnumerable< IEvent< TAuthenticationToken > > Get< T > (Guid aggregateId, bool useLastEventOnly=false, int fromVersion=-1)
 Gets a collection of IEvent<TAuthenticationToken> for the T aggregate root with the ID matching the provided aggregateId . More...
 
IEnumerable< IEvent< TAuthenticationToken > > Get (Type aggregateRootType, Guid aggregateId, bool useLastEventOnly=false, int fromVersion=-1)
 Gets a collection of IEvent<TAuthenticationToken> for the IAggregateRoot<TAuthenticationToken> of type aggregateRootType with the ID matching the provided aggregateId . More...
 
IEnumerable< IEvent< TAuthenticationToken > > GetToVersion (Type aggregateRootType, Guid aggregateId, int version)
 Gets a collection of IEvent<TAuthenticationToken> for the IAggregateRoot<TAuthenticationToken> of type aggregateRootType with the ID matching the provided aggregateId up to and including the provided version . More...
 
IEnumerable< IEvent< TAuthenticationToken > > GetToVersion< T > (Guid aggregateId, int version)
 Gets a collection of IEvent<TAuthenticationToken> for the T aggregate root with the ID matching the provided aggregateId up to and including the provided version . More...
 
IEnumerable< IEvent< TAuthenticationToken > > GetToDate (Type aggregateRootType, Guid aggregateId, DateTime versionedDate)
 Gets a collection of IEvent<TAuthenticationToken> for the IAggregateRoot<TAuthenticationToken> of type aggregateRootType with the ID matching the provided aggregateId up to and including the provided versionedDate . More...
 
IEnumerable< IEvent< TAuthenticationToken > > GetToDate< T > (Guid aggregateId, DateTime versionedDate)
 Gets a collection of IEvent<TAuthenticationToken> for the T aggregate root with the ID matching the provided aggregateId up to and including the provided versionedDate . More...
 
IEnumerable< IEvent< TAuthenticationToken > > GetBetweenDates (Type aggregateRootType, Guid aggregateId, DateTime fromVersionedDate, DateTime toVersionedDate)
 Gets a collection of IEvent<TAuthenticationToken> for the IAggregateRoot<TAuthenticationToken> of type aggregateRootType with the ID matching the provided aggregateId from and including the provided fromVersionedDate up to and including the provided toVersionedDate . More...
 
IEnumerable< IEvent< TAuthenticationToken > > GetBetweenDates< T > (Guid aggregateId, DateTime fromVersionedDate, DateTime toVersionedDate)
 Gets a collection of IEvent<TAuthenticationToken> for the T aggregate root with the ID matching the provided aggregateId from and including the provided fromVersionedDate up to and including the provided toVersionedDate . More...
 
IEnumerable< Events.EventDataGet (Guid correlationId)
 Get all IEvent<TAuthenticationToken> instances for the given correlationId . More...
 

Protected Member Functions

virtual void ListenForNotificationsOnConnection (IEventStoreConnection connection)
 Requests the connection responds to OnConnect client notifications. More...
 

Static Protected Attributes

const string CqrsEventStoreStreamNamePattern = "{0}/{1}"
 The pattern used to create stream names. More...
 

Properties

IEventBuilder< TAuthenticationToken > EventBuilder [get, set]
 The IEventBuilder<TAuthenticationToken> used to build events. More...
 
IEventDeserialiser< TAuthenticationToken > EventDeserialiser [get, set]
 The IEventDeserialiser<TAuthenticationToken> used to deserialise events. More...
 
IEventStoreConnection EventStoreConnection [get, set]
 The IEventStoreConnection used to read and write streams in the Greg Young Event Store. More...
 

Detailed Description

A Greg Young Event Store based EventStore<TAuthenticationToken>.

Template Parameters
TAuthenticationTokenThe Type of the authentication token.