public ProductCommandHandlers( GetStreamName getStreamName, AsyncRepository <Product> repository, AsyncSnapshotableRepository <Product> snapshotableRepository, Now now) : base(getStreamName, repository, snapshotableRepository, now) { }
public GesAggregateStore( GetStreamName getStreamName, IEventStoreConnection connection, TypeMapper typeMapper, UserCredentials userCredentials = null) { _getStreamName = getStreamName ?? throw new ArgumentNullException(nameof(connection)); _connection = connection ?? throw new ArgumentNullException(nameof(connection)); _typeMapper = typeMapper ?? throw new ArgumentNullException(nameof(typeMapper)); _userCredentials = userCredentials; }
public CommandHandlerBase( GetStreamName getStreamName, AsyncRepository <T> repository, AsyncSnapshotableRepository <T> snapshotableRepository, Now now) { _repository = repository; _now = now; _getStreamName = getStreamName; _snapshotableRepository = snapshotableRepository; }
public EventStoreRepository(IEventStoreConnection connection) { this.connection = connection; getStreamName = (type, guid) => $"{type.Name}-{guid}"; // todo make this a delegate log = LogManager.GetLogger(GetType()); eventStreamReaders = new Dictionary <ReadDirection, Func <string, int, int, Task <StreamEventsSlice> > >() { [ReadDirection.Forwards] = async(s, i, c) => await connection.ReadStreamEventsForwardAsync(s, i, c, resolveLinkTos : true).ConfigureAwait(false), [ReadDirection.Backwards] = async(s, i, c) => await connection.ReadStreamEventsBackwardAsync(s, i, c, true).ConfigureAwait(false) }; }
public GesSnapshotStore(IEventStoreConnection eventStoreConnection, ISerializer serializer, EventTypeMapper eventTypeMapper, GetStreamName getStreamName, UserCredentials userCredentials = null) { this.eventStoreConnection = eventStoreConnection ?? throw new ArgumentNullException(nameof(eventStoreConnection));; this.serializer = serializer ?? throw new ArgumentException(nameof(serializer)); this.eventTypeMapper = eventTypeMapper ?? throw new ArgumentException(nameof(eventTypeMapper)); this.getStreamName = getStreamName ?? throw new ArgumentException(nameof(getStreamName)); this.userCredentials = userCredentials; }
public GesAggregateStore( GetStreamName getStreamName, IEventStoreConnection connection, ISerializer serializer, TypeMapper typeMapper, UserCredentials userCredentials = null) { this.getStreamName = getStreamName ?? throw new ArgumentNullException(nameof(connection)); this.connection = connection ?? throw new ArgumentNullException(nameof(connection)); this.serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); this.typeMapper = typeMapper ?? throw new ArgumentNullException(nameof(typeMapper)); this.userCredentials = userCredentials; }
public AggregateRepository(IEventStoreAdapter eventStoreAdapter, GetStreamName getStreamName, int pageSizeReadBuffer = 200) { _eventStoreAdapter = eventStoreAdapter; _getStreamName = getStreamName; _pageSizeReadBuffer = pageSizeReadBuffer; }
public TypedStreamNameResolver(Type streamType, GetStreamName getStreamName) { _streamType = streamType; _getStreamName = getStreamName; }