コード例 #1
0
        public void ConsumeBySaga(IEvent[] appendedEvents)
        {
            var consumers = new EventRegister(typeof(IConsumesAsync<>));

            foreach (var instance in projections.Values.Where(x => x.type == ProjectionType.Saga).Select(x => x.Create(this.viewProvider, getBus())))
            {
                consumers.Subscribe(instance);
            }

            foreach (var e in appendedEvents)
            {
                consumers.Consume(e);
            }
        }
コード例 #2
0
        public void ConsumeBySaga(IEvent[] appendedEvents)
        {
            var consumers = new EventRegister(typeof(IConsumesAsync <>));

            foreach (var instance in projections.Values.Where(x => x.type == ProjectionType.Saga).Select(x => x.Create(this.viewProvider, getBus())))
            {
                consumers.Subscribe(instance);
            }

            foreach (var e in appendedEvents)
            {
                consumers.Consume(e);
            }
        }