Class BlobStorageEventStore<TAuthenticationToken>
An Azure blob storage based EventStore<TAuthenticationToken>.
Inheritance
Inherited Members
Namespace: Cqrs.Azure.BlobStorage.Events
Assembly: Cqrs.Azure.BlobStorage.dll
Syntax
public class BlobStorageEventStore<TAuthenticationToken> : EventStore<TAuthenticationToken>, IEventStore<TAuthenticationToken>
Type Parameters
Name | Description |
---|---|
TAuthenticationToken | The System.Type of the authentication token. |
Constructors
BlobStorageEventStore(IEventBuilder<TAuthenticationToken>, IEventDeserialiser<TAuthenticationToken>, ILogger, IBlobStorageStoreConnectionStringFactory)
Initializes a new instance of the BlobStorageEventStore<TAuthenticationToken> class using the specified container.
Declaration
public BlobStorageEventStore(IEventBuilder<TAuthenticationToken> eventBuilder, IEventDeserialiser<TAuthenticationToken> eventDeserialiser, ILogger logger, IBlobStorageStoreConnectionStringFactory blobStorageEventStoreConnectionStringFactory)
Parameters
Type | Name | Description |
---|---|---|
IEventBuilder<TAuthenticationToken> | eventBuilder | |
IEventDeserialiser<TAuthenticationToken> | eventDeserialiser | |
cdmdotnet.Logging.ILogger | logger | |
IBlobStorageStoreConnectionStringFactory | blobStorageEventStoreConnectionStringFactory |
Properties
BlobStorageStore
Declaration
protected BlobStorageEventStore<TAuthenticationToken>.RawBlobStorageEventStore BlobStorageStore { get; }
Property Value
Type | Description |
---|---|
BlobStorageEventStore.RawBlobStorageEventStore<> |
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>> |
Overrides
PersistEvent(EventData)
Persist the provided eventData
into storage.
Declaration
protected override void PersistEvent(EventData eventData)
Parameters
Type | Name | Description |
---|---|---|
EventData | eventData | The EventData to persist. |