public InMemoryEventStoreETagChecker(InMemoryEventStream eventStream) { if (eventStream == null) { throw new ArgumentNullException(nameof(eventStream)); } this.eventStream = eventStream; }
public InMemoryEventStoreETagChecker(InMemoryEventStream eventStream) { if (eventStream == null) { throw new ArgumentNullException("eventStream"); } this.eventStream = eventStream; }
public InMemoryCommandPreconditionVerifier(InMemoryEventStream eventStream) { if (eventStream == null) { throw new ArgumentNullException("eventStream"); } this.eventStream = eventStream; }
public InMemoryEventStoreDbContext(InMemoryEventStream eventStream = null) { this.eventStream = eventStream ?? new InMemoryEventStream(); eventStream = eventStream ?? Domain.Configuration .Current .Container .Resolve <InMemoryEventStream>(); sqlEvents = new InMemoryDbSet <StorableEvent>(new HashSet <StorableEvent>(eventStream.Events.Select(e => e.ToStorableEvent()))); }
internal static IEventStream ToEventStream(this IEnumerable <IEvent> events, string name) { var stream = new InMemoryEventStream(name); var storableEvents = events.AssignSequenceNumbers() .Select(e => e.ToStoredEvent()); stream.Append(storableEvents.ToArray()) .Wait(); return(stream); }
/// <summary> /// Initializes a new instance of the <see cref="InMemoryEventSourcedRepository{TAggregate}"/> class. /// </summary> public InMemoryEventSourcedRepository(InMemoryEventStream eventStream = null, IEventBus bus = null) { this.eventStream = eventStream ?? new InMemoryEventStream(AggregateType <TAggregate> .EventStreamName); this.bus = bus ?? new FakeEventBus(); }
/// <summary> /// Initializes a new instance of the <see cref="InMemoryEventSourcedRepository{TAggregate}"/> class. /// </summary> public InMemoryEventSourcedRepository(InMemoryEventStream eventStream = null, IEventBus bus = null) { this.eventStream = eventStream ?? new InMemoryEventStream(); this.bus = bus ?? new FakeEventBus(); }