public void Run(object entity)
        {
            if (entity is CleanTemplate)
            {
                CleanTemplate template = (CleanTemplate)entity;

                RunCleanTemplate.Request request = new RunCleanTemplate.Request(
                    template.Id,
                    template.Name.Text,
                    template.UseCases.Text,
                    template.UserInterface.Text,
                    template.DataAccess.Text,
                    template.Tips.Text,
                    template.SkipRestore.Text);

                cleanController.Run(request);
            }

            if (entity is HexagonalTemplate)
            {
                HexagonalTemplate template = (HexagonalTemplate)entity;

                RunHexagonalTemplate.Request request = new RunHexagonalTemplate.Request(
                    template.Id,
                    template.Name.Text,
                    template.UseCases.Text,
                    template.UserInterface.Text,
                    template.DataAccess.Text,
                    template.Tips.Text,
                    template.SkipRestore.Text);

                hexagonalController.Run(request);
            }

            if (entity is EventSourcingTemplate)
            {
                EventSourcingTemplate template = (EventSourcingTemplate)entity;

                RunEventSourcingTemplate.Request request = new RunEventSourcingTemplate.Request(
                    template.Id,
                    template.Name.Text,
                    template.UseCases.Text,
                    template.UserInterface.Text,
                    template.DataAccess.Text,
                    template.ServiceBus.Text,
                    template.Tips.Text,
                    template.SkipRestore.Text);

                eventSourcingController.Run(request);
            }
        }
Beispiel #2
0
        public void Process(Input input)
        {
            EventSourcingTemplate order = new EventSourcingTemplate(
                input.Name,
                input.UseCases,
                input.UserInterface,
                input.DataAccess,
                input.ServiceBus,
                input.Tips,
                input.SkipRestore);

            bus.Publish(order);

            trackingService.OrderReceived(
                order.Id,
                order.Name.Text,
                order.CommandLines);

            OrderOutput generateOutput = outputConverter.Map <OrderOutput>(order);

            outputBoundary.Populate(generateOutput);
        }