示例#1
0
 private void When(BuildBindingsRemoved @event)
 {
     foreach ((BuildsBinding binding, Guid[] _) in @event.BindingsToBuilds)
     {
         BindingToBuilds.Remove(binding);
     }
 }
        /// <inheritdoc />
        public async Task Handle(BuildBindingsRemoved @event, CancellationToken cancellationToken)
        {
            var buildBindings = await MapToReadModels(@event.BindingsToBuilds.Keys);

            await Update(@event, distribution => distribution.BuildBindings.RemoveAll(x => buildBindings.Contains(x)), cancellationToken);
        }