Ejemplo n.º 1
0
 public CalculatorService(ChurchCalculatorService churchCalculatorService, CastleCalculatorService castleCalculatorService, RoadCalculatorService roadCalculatorService, IFigureService figureService)
 {
     ChurchCalculatorService = churchCalculatorService;
     CastleCalculatorService = castleCalculatorService;
     RoadCalculatorService   = roadCalculatorService;
     FigureService           = figureService;
 }
        public void Init()
        {
            this.ConfigureMapper();
            this.orders = new List <Order>()
            {
                new Order()
                {
                    Id = 1,
                    ApplicationUserId = "a2f23d5c-f9ef-41c0-95d4-52934b9d9dde"
                },
                new Order()
                {
                    Id = 21,
                    ApplicationUserId = "a2f23d5c-f9ef-41c0-95d4-52934b9d9dde"
                }
            };

            this._repository        = new FakeDeletableRepository <Order>();
            this._figuresRepository = new FakeDeletableRepository <Figure>();
            this._arepository       = new FakeDeletableRepository <Appearance>();
            this._carepository      = new FakeDeletableRepository <Category>();

            foreach (var order in this.orders)
            {
                order.Appearance = new Appearance()
                {
                    Name         = "Кутия от 100бр",
                    Price        = 2990.23m,
                    CookiesCount = 10
                };

                this._repository.Add(order);
            }

            this._service       = new OrderService(this._repository, this._arepository, this._carepository);
            this._figureService = new FigureService(this._figuresRepository);
            this._controller    = new AdminOrdersController(this._service, this._figureService);
        }
Ejemplo n.º 3
0
 public FigureController(IFigureService figureService)
 {
     FigureService = figureService;
 }
 public GamePlayService(ICalculateService calculateService, IFigureService figureService)
 {
     this.calculateService = calculateService;
     this.figureService    = figureService;
 }
Ejemplo n.º 5
0
 public AdminOrdersController(IOrderService service, IFigureService figureService)
 {
     this.service       = service;
     this.figureService = figureService;
 }
 public FiguresController(IFigureService service)
 {
     this.service = service;
 }