Beispiel #1
0
        public async Task Handle(long streamPosition, ProjectEvents.EnvironmentStateDeleted @event, CancellationToken stoppingToken)
        {
            var tasks = new List <Task>();

            foreach (var toggleKey in @event.ToggleKeys)
            {
                var eventAudit = CreateEventAudit(streamPosition, @event);
                var task       = UpdateOrDeleteToggleState(eventAudit, @event.Id, @event.EnvironmentKey, toggleKey);
                tasks.Add(task);
            }

            await Task.WhenAll(tasks);
        }
Beispiel #2
0
        public async Task Handle(long streamPosition, ProjectEvents.EnvironmentStateDeleted @event, CancellationToken stoppingToken)
        {
            var storeKey = Projection.StoreKey(@event.Id, @event.EnvironmentKey);

            await Projections.Delete(storeKey).ConfigureAwait(false);
        }