protected override IEnumerable <XElement> ParseChildren(Type type)
 {
     foreach (var sagaEvent in _recognizer.GetEventsForSaga(type))
     {
         yield return(new XElement("Event", new XAttribute("boundedContext", _recognizer.GetBoundedContextName(sagaEvent)),
                                   new XAttribute("name", sagaEvent.Name)));
     }
 }
Beispiel #2
0
        protected override IEnumerable <XElement> ParseChildren(Type type)
        {
            foreach (var handler in DomainProcessor.Current.GetTypes())
            {
                if (_recognizer.IsEventListener(handler, type))
                {
                    yield return
                        (new XElement("Listener",
                                      new XAttribute("boundedContext", _recognizer.GetBoundedContextName(handler)),
                                      new XAttribute("name", handler.Name)));
                }

                if (_recognizer.IsSagaHandlingEvent(handler, type))
                {
                    yield return
                        (new XElement("Saga",
                                      new XAttribute("boundedContext", _recognizer.GetBoundedContextName(handler)),
                                      new XAttribute("name", handler.Name)));
                }
            }
        }
Beispiel #3
0
        public IEnumerable <XElement> Parse(IEnumerable <Type> types)
        {
            var contexts = from t in types
                           let bc = _recognizer.GetBoundedContextName(t)
                                    group t by bc
                                    into g
                                    where g.Key != ""
                                    select g;

            foreach (var bc in contexts)
            {
                yield return(new XElement("BoundedContext",
                                          new XAttribute("name", bc.Key),
                                          ParseChildren(bc)));
            }
        }