public ProjectionRepository(CronusContext context, IProjectionStore projectionStore, ISnapshotStore snapshotStore, ISnapshotStrategy snapshotStrategy, InMemoryProjectionVersionStore inMemoryVersionStore, IHandlerFactory handlerFactory, ProjectionHasher projectionHasher) { if (context is null) { throw new ArgumentException(nameof(context)); } if (projectionStore is null) { throw new ArgumentException(nameof(projectionStore)); } if (snapshotStore is null) { throw new ArgumentException(nameof(snapshotStore)); } if (snapshotStrategy is null) { throw new ArgumentException(nameof(snapshotStrategy)); } if (inMemoryVersionStore is null) { throw new ArgumentException(nameof(inMemoryVersionStore)); } this.context = context; this.projectionStore = projectionStore; this.snapshotStore = snapshotStore; this.snapshotStrategy = snapshotStrategy; this.inMemoryVersionStore = inMemoryVersionStore; this.handlerFactory = handlerFactory; this.projectionHasher = projectionHasher; }
public EventStoreIndexController(CronusContext context, TypeContainer <IEventStoreIndex> endicesTypes, IPublisher <ICommand> publisher, ProjectionExplorer projection) { this.context = context; this.endicesTypes = endicesTypes; this.publisher = publisher; this.projection = projection; }
public ProjectionVersionHelper(CronusContext context, IProjectionReader projectionReader, IInitializableProjectionStore projectionVersionInitializer, ProjectionHasher projectionHasher, ILogger <ProjectionVersionHelper> logger) { this.context = context; this.projectionReader = projectionReader; this.projectionVersionInitializer = projectionVersionInitializer; this.projectionHasher = projectionHasher; this.logger = logger; }
public ProgressTracker(IMessageCounter messageCounter, CronusContext context, IPublisher <ISignal> signalPublisher, ProjectionVersionHelper projectionVersionHelper, ILogger <ProgressTracker> logger) { tenant = context.Tenant; this.messageCounter = messageCounter; this.signalPublisher = signalPublisher; this.projectionVersionHelper = projectionVersionHelper; this.logger = logger; }
public SingletonPerTenant(SingletonPerTenantContainer <T> container, CronusContext context) { if (context is null) { throw new ArgumentNullException(nameof(context)); } this.container = container; this.context = context; }
public ProjectionPlayer(CronusContext context, IEventStore eventStore, IProjectionWriter projectionRepository, IProjectionReader projectionReader, IInitializableProjectionStore projectionStoreInitializer, EventToAggregateRootId index) { this.context = context; this.eventStore = eventStore; this.projectionWriter = projectionRepository; this.projectionReader = projectionReader; this.projectionStoreInitializer = projectionStoreInitializer; this.index = index; }
public RebuildIndex_MessageCounter_Job(CronusContext context, TypeContainer <IEvent> eventTypes, EventStoreFactory eventStoreFactory, IMessageCounter eventCounter, EventToAggregateRootId eventToAggregateIndex, IProjectionReader projectionReader, ILogger <RebuildIndex_MessageCounter_Job> logger) : base(logger) { this.context = context; this.eventTypes = eventTypes; this.eventStore = eventStoreFactory.GetEventStore(); this.messageCounter = eventCounter; this.eventToAggregateIndex = eventToAggregateIndex; this.projectionReader = projectionReader; }
public IndexRebuildActionsController(IPublisher <ICommand> publisher, CronusContext context) { if (publisher is null) { throw new ArgumentNullException(nameof(publisher)); } _publisher = publisher; this.context = context; }
public static IApplicationBuilder UseCronusAspNetCore(this IApplicationBuilder app) { return(app.Use((context, next) => { var cronusContextFactory = context.RequestServices.GetRequiredService <CronusContextFactory>(); CronusContext cronusContext = cronusContextFactory.GetContext(context, context.RequestServices); return next.Invoke(); })); }
public ProjectionMetaController(ProjectionExplorer projectionExplorer, CronusContext context, ProjectionHasher projectionHasher) { if (projectionExplorer is null) { throw new ArgumentNullException(nameof(projectionExplorer)); } _projectionExplorer = projectionExplorer; this.context = context; this.projectionHasher = projectionHasher; }
public void Bootstrap() { foreach (var tenant in tenants.GetTenants()) { using (var scope = serviceProvider.CreateScope()) { CronusContext context = scope.ServiceProvider.GetRequiredService <CronusContext>(); context.Initialize(tenant, scope.ServiceProvider); scope.ServiceProvider.GetRequiredService <ICassandraEventStoreSchema>().CreateStorage(); } } }
public ProjectionCancelController(IPublisher <ICommand> publisher, CronusContext context) { if (publisher is null) { throw new ArgumentNullException(nameof(publisher)); } if (context is null) { throw new ArgumentNullException(nameof(context)); } _publisher = publisher; this.context = context; }
public IndexListController(ProjectionExplorer projectionExplorer, CronusContext context, ProjectionHasher projectionHasher, TypeContainer <IEventStoreIndex> indicesMeta) { if (projectionExplorer is null) { throw new ArgumentNullException(nameof(projectionExplorer)); } if (context is null) { throw new ArgumentNullException(nameof(context)); } _projectionExplorer = projectionExplorer; this.context = context; this.projectionHasher = projectionHasher; this.indicesMeta = indicesMeta; }
public static IApplicationBuilder UseCronusAspNetCore(this IApplicationBuilder app, Func <HttpContext, bool> shouldResolveTenant) { return(app.Use((context, next) => { bool shouldResolve = true; if (shouldResolveTenant is null == false) { shouldResolve = shouldResolveTenant(context); } if (shouldResolve) { var cronusContextFactory = context.RequestServices.GetRequiredService <CronusContextFactory>(); CronusContext cronusContext = cronusContextFactory.GetContext(context, context.RequestServices); } return next.Invoke(); })); }
public ProjectionExplorer(IProjectionReader projections, IProjectionStore projectionStore, CronusContext context) { if (ReferenceEquals(null, projections) == true) { throw new ArgumentNullException(nameof(projections)); } if (ReferenceEquals(null, projectionStore) == true) { throw new ArgumentNullException(nameof(projectionStore)); } if (ReferenceEquals(null, context) == true) { throw new ArgumentNullException(nameof(context)); } this.projections = projections; this.projectionStore = projectionStore; this.context = context; }
public Projection_JobFactory(RebuildProjection_Job job, IOptions <BoundedContext> boundedContext, CronusContext context) { this.job = job; this.context = context; this.boundedContext = boundedContext.Value; }
public ReplayPublicEvents_JobFactory(ReplayPublicEvents_Job job, IOptions <BoundedContext> boundedContext, CronusContext context) { this.job = job; this.context = context; this.boundedContext = boundedContext.Value; }
public GGPort(IProjectionStore projectionStore, CronusContext cronusContext, ILogger <GGPort> logger) { this.projectionStore = projectionStore; this.cronusContext = cronusContext; this.logger = logger; }
public DefaultJobNameBuilder(IOptions <BoundedContext> boundedContext, CronusContext context) { this.boundedContext = boundedContext.Value; this.context = context; }
public RebuildIndex_MessageCounter_JobFactory(RebuildIndex_MessageCounter_Job job, IOptions <BoundedContext> boundedContext, CronusContext context) { this.job = job; this.context = context; this.boundedContext = boundedContext.Value; }
public KeyspacePerTenantKeyspace(CronusContext context) { this.context = context; }