Ejemplo n.º 1
0
        public MyController(IRouteDataManager routeManager, IDataProcessorManager dataProcessor)
        {
            this.routeManager  = routeManager;
            this.dataProcessor = dataProcessor;

            this.Before.AddItemToStartOfPipeline(x => { return(null); });

            this.After.AddItemToStartOfPipeline(x => { });

            this.Get("/", args => ShowMe());

            this.Get("/{id:long}", args => this.GetSomeoneByLong(args.id));

            this.Get("/{id:int}", args => this.GetSomeoneByInt(args.id));

            this.Get("/{id:guid}", args => this.GetSomeoneByGuid(args.id));

            this.Get("/stringOnly/{id}", args => this.GetSomeoneByString(args.id));

            this.Get("/country/(?<country>[A-Z]{3})/name/{name}", args => this.GetSomeoneByRegionAndName(args.country, args.name));

            this.Get("/{file}.{ext:length(3,3)}", args => this.GetSomeoneByFilleNameAndExtension(args.file, args.ext));

            this.Post("/process", args => this.ProcessData());
        }
Ejemplo n.º 2
0
        DataCenter(
            IEntityManager someEntityManager,
            IDataProcessorManager someDataProcessorManager,
            IDataCore someDataCore)
        {
            // someEntityManager
            if (someEntityManager == null)
            {
                throw new ArgumentNullException("someEntityManager");
            }

            this.entityManager = someEntityManager;
            this.entityManager.OnAttach(this);

            // someDataProcessorManager
            if (someDataProcessorManager == null)
            {
                throw new ArgumentNullException("someDataProcessorManager");
            }

            this.dataProcessorManager = someDataProcessorManager;
            this.dataProcessorManager.OnAttach(this);

            // someDataCore
            if (someDataCore == null)
            {
                throw new ArgumentNullException("someDataCore");
            }

            dataCore = someDataCore;

            deltaTime = 0.0;
        }
 public DataProcessorsController(IMapper mapper, IDataProcessorManager manager)
 {
     _mapper  = mapper;
     _manager = manager;
 }