Example #1
0
        public IGlobalOrderRepository Next(IGlobalOrderRepository globalOrderRepository, string currentPartName)
        {
            if (string.IsNullOrWhiteSpace(currentPartName))
            {
                currentPartName = Constants.BuiltInPart.INITIALIZING;
            }

            var nextPartName = ProcessingFlow.GetNextPartName(currentPartName, this.GetType().ToString());

            if (nextPartName == Constants.BuiltInPart.FINALIZING)
            {
                return(globalOrderRepository);
            }

            var nextPart = ProcessingFlow.GetPart(nextPartName, _compositionParts);

            if (nextPart != null)
            {
                return(nextPart.Process(globalOrderRepository, this.GetType().ToString()));
            }
            else
            {
                return(Next(globalOrderRepository, nextPartName));
            }
        }
Example #2
0
        public new IGlobalOrderRepository Process(IGlobalOrderRepository globalOrderRepository, string controllerName)
        {
            var orders = globalOrderRepository.GetOrdersByBiller(1);

            foreach (var order in orders)
            {
                order.Biller.Name = order.Biller.Name + " (" + this.GetType().ToString() + "2)";
            }

            return(Next(globalOrderRepository, this.GetType().ToString(), controllerName));
        }
Example #3
0
        public IGlobalOrderRepository Process(IGlobalOrderRepository globalOrderRepository)
        {
            var orders = globalOrderRepository.GetOrdersByBiller(1);

            foreach (var order in orders)
            {
                order.Biller.Name = order.Biller.Name + " (Init)";
            }

            return(Next(globalOrderRepository, null));
        }
Example #4
0
        public IGlobalOrderRepository Next(IGlobalOrderRepository globalOrderRepository, string currentPartName, string controllerName)
        {
            var nextPartName = ProcessingFlow.GetNextPartName(currentPartName, controllerName);

            if (nextPartName == Constants.BuiltInPart.FINALIZING)
            {
                return(globalOrderRepository);
            }

            _nextPart = ProcessingFlow.GetPart(nextPartName, _compositionParts);
            if (_nextPart != null)
            {
                return(_nextPart.Process(globalOrderRepository, controllerName));
            }
            else
            {
                return(Next(globalOrderRepository, nextPartName, controllerName));
            }
        }
Example #5
0
 public HomeController(IGlobalOrderRepository globalOrderRepository)
 {
     _globalOrderRepository = globalOrderRepository;
 }
Example #6
0
 public CustomApiController(IGlobalOrderRepository globalOrderRepository)
 {
     _globalOrderRepository = globalOrderRepository;
 }