Class TableStorageEventStore<TAuthenticationToken>
An Azure Storage based EventStore<TAuthenticationToken>.
Inheritance
Inherited Members
Namespace: Cqrs.Azure.Storage.Events
Assembly: Cqrs.Azure.Storage.dll
Syntax
public class TableStorageEventStore<TAuthenticationToken> : TableStorageEventStore<TAuthenticationToken>, IEventStore<TAuthenticationToken>
Type Parameters
Name | Description |
---|---|
TAuthenticationToken | The System.Type of the authentication token. |
Constructors
TableStorageEventStore(IEventBuilder<TAuthenticationToken>, IEventDeserialiser<TAuthenticationToken>, ILogger, ITableStorageStoreConnectionStringFactory)
Initializes a new instance of the TableStorageEventStore<TAuthenticationToken> class using the specified container.
Declaration
public TableStorageEventStore(IEventBuilder<TAuthenticationToken> eventBuilder, IEventDeserialiser<TAuthenticationToken> eventDeserialiser, ILogger logger, ITableStorageStoreConnectionStringFactory tableStorageEventStoreConnectionStringFactory)
Parameters
Type | Name | Description |
---|---|---|
IEventBuilder<TAuthenticationToken> | eventBuilder | |
IEventDeserialiser<TAuthenticationToken> | eventDeserialiser | |
cdmdotnet.Logging.ILogger | logger | |
ITableStorageStoreConnectionStringFactory | tableStorageEventStoreConnectionStringFactory |
Methods
Get(Guid)
Get all IEvent<TAuthenticationToken> instances for the given correlationId
.
Declaration
public override IEnumerable<EventData> Get(Guid correlationId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | correlationId | The CorrelationId of the IEvent<TAuthenticationToken> instances to retrieve. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EventData> |
Overrides
Get(Type, Guid, Boolean, Int32)
Gets a collection of IEvent<TAuthenticationToken> for the IAggregateRoot<TAuthenticationToken> of type aggregateRootType
with the ID matching the provided aggregateId
.
Declaration
public override IEnumerable<IEvent<TAuthenticationToken>> Get(Type aggregateRootType, Guid aggregateId, bool useLastEventOnly = false, int fromVersion = -1)
Parameters
Type | Name | Description |
---|---|---|
System.Type | aggregateRootType | System.Type of the IAggregateRoot<TAuthenticationToken> the IEvent<TAuthenticationToken> was raised in. |
System.Guid | aggregateId | The Id of the IAggregateRoot<TAuthenticationToken>. |
System.Boolean | useLastEventOnly | Loads only the last eventIEvent<TAuthenticationToken>. |
System.Int32 | fromVersion | Load events starting from this version |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IEvent<TAuthenticationToken>> |