static void Main() { var r = new BuildingBlockRecognizer(); var p = new DomainProcessor( new BoundedContextProcessor(r, new GroupingProcessor("Commands", new CommandProcessor(r) ), new GroupingProcessor("Domain", new AggregateProcessor(r), new ValueObjectProcessor(r), new DomainEventProcessor(r), new RepositoryProcessor(r), new ServiceProcessor(r), new FactoryProcessor(r)), new SagaProcessor(r) )); p.AddAssemblyOfType <Invoice>(); p.AddAssemblyOfType <OrderCreatedEvent>(); p.AddAssemblyOfType <Customer>(); p.AddAssemblyOfType <CustomerStatusChangedEvent>(); p.AddAssemblyOfType <Shipment>(); p.AddAssemblyOfType <OrderShippedEvent>(); p.AddAssemblyOfType <Money>(); XElement xml = p.Parse(); // Console.WriteLine(xml); var builder = new DomainSvgBuilder(); var svg = builder.CreateDocument().ToString(); var script = File.ReadAllText("script.html"); svg = svg.Insert(svg.IndexOf("</style>") + 8, script); // Console.WriteLine(svg); File.WriteAllText("a.svg", svg); }
public BoundedContextProcessor(BuildingBlockRecognizer recognizer, params IProcessor <Type>[] subProcessors) : base(subProcessors) { _recognizer = recognizer; }
public SagaProcessor(BuildingBlockRecognizer recognizer) : base("Saga", recognizer.IsSaga) { _recognizer = recognizer; }
public AggregateProcessor(BuildingBlockRecognizer recognizer) : base("Aggregate", recognizer.IsAggregateRoot) { }
public DomainEventProcessor(BuildingBlockRecognizer recognizer) : base("Event", recognizer.IsDomainEvent) { _recognizer = recognizer; }
public CommandProcessor(BuildingBlockRecognizer recognizer) : base("Command", recognizer.IsCommand) { _recognizer = recognizer; }