protected ProjectorBase(string name, IStreamDataSource dataSource, IProjectionCheckpointRepository checkpointRepository, ISerializer serializer, int batchSize) { if (name.IsNullOrEmpty()) { throw new ArgumentException("Name of projector must be set.", nameof(name)); } if (batchSize <= 0) { throw new ArgumentException("Batch size must be greater than zero.", nameof(batchSize)); } _checkpointRepository = checkpointRepository ?? throw new ArgumentNullException(nameof(checkpointRepository)); ProjectionFactory = new ActivatorProjectionFactory(); Logger = new NullLogger(); Name = name; DataSource = dataSource ?? throw new ArgumentNullException(nameof(dataSource)); Serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); BatchSize = batchSize; MaxProjectingRetries = 3; _projectionDescriptors = new List <ProjectionDescriptor>(20); }
public Projector(string name, IStreamDataSource dataSource, IProjectionCheckpointRepository checkpointRepository, ISerializer serializer, int batchSize = 1000) : base(name, dataSource, checkpointRepository, serializer, batchSize) { }