Ejemplo n.º 1
0
        public UserController(IUserRepositoryProxy proxy, IBootStrapper bootstrapper)
        {
            _proxy = proxy;
            _bootstrapper = bootstrapper;

            _bootstrapper.InitializeApplication();
        }
Ejemplo n.º 2
0
        public UserController()
        {
            _proxy = new UserRepositoryProxy();
            _bootstrapper = new BootStrapper();

            _bootstrapper.InitializeApplication();
        }
Ejemplo n.º 3
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);

            _bootstrapper = new BootStrapper();

            _bootstrapper.InitializeApplication();
        }
Ejemplo n.º 4
0
        public void AutofacRegisterComponentes(ContainerBuilder builder, IBootStrapper bootStrapper)
        {
            builder.RegisterModule(new BusinessLogicUsageModule());
            builder.RegisterType<MembershipBusinessLogic>().As<IMembershipBusinessLogic>();
            builder.RegisterType<IngredientBusinessLogic>().As<IIngredientBusinessLogic>();
            builder.RegisterType<UserBusinessLogic>().As<IUserBusinessLogic>();
            builder.RegisterType<UserIngredientBusinessLogic>().As<IUserIngredientBusinessLogic>();
            builder.RegisterType<UserProfileBusinessLogic>().As<IUserProfileBusinessLogic>();
            builder.RegisterType<NutrientBusinessLogic>().As<INutrientBusinessLogic>();
            builder.RegisterType<GenderTypeBusinessLogic>().As<IGenderTypeBusinessLogic>();
            builder.RegisterType<ActivityLevelTypeBusinessLogic>().As<IActivityLevelTypeBusinessLogic>();
            builder.RegisterType<CalorieCalculator>().As<ICalorieCalculator>();

            builder.RegisterType<SchemaExportEngine>().As<ISchemaExportEngine>();
            builder.RegisterType<IngredientImporterEngine>().As<IIngredientImporterEngine>();
            builder.RegisterType<InitialDataValuesExportEngine>().As<IInitialDataValuesExportEngine>();
            builder.RegisterType<NutrientRecommendationBusinessLogic>().As<INutrientRecommendationBusinessLogic>();

            builder.RegisterType<NutrientRecommendationImportEngine>().SingleInstance().As<INutrientRecommendationImporter>();
            builder.RegisterType<IronRDIImporter>().As<IIronRDIImporter>();

            builder.RegisterInstance(bootStrapper);

            builder.RegisterType<UserWeightBusinessLogic>().As<IUserWeightBusinessLogic>();

            builder.RegisterType<IngredientFileReader>().As<IIngredientFileReader>();
            builder.RegisterType<IngredientImporter>().As<IIngredientImporter>();
            builder.RegisterType<IngredientParser>().As<IIngredientParser>();

            builder.RegisterType<MineralRDICalculator>().As<IMineralRDICalculator>();
            builder.RegisterType<CarbonHydrateRDICalculator>().As<ICarbonHydrateRDICalculator>();
            builder.RegisterType<FatRDICalculator>().As<IFatRDICalculator>();
            builder.RegisterType<EnergyKcalRDICalculator>().As<IEnergyKcalRDICalculator>();
            builder.RegisterType<FibresRDICalculator>().As<IFibresRDICalculator>();
            builder.RegisterType<ProteinRDICalculator>().As<IProteinRDICalculator>();

            builder.RegisterType<RDICalculatorFactory>().SingleInstance().As<IRDICalculatorFactory>();
        }
Ejemplo n.º 5
0
 public ServiceCoordinator( DaemonConfiguration configuration, IBootStrapper bootStrapper )
 {
     Services = new List<IServiceController>();
     Configuration = configuration;
     RegisterServices();
     BootStrap = bootStrapper;
 }
Ejemplo n.º 6
0
 public FilesController(IBootStrapper bootstrapper, IFileRepositoryProxy proxy)
 {
     _proxy = proxy;
 }
Ejemplo n.º 7
0
 public SchemaExportEngine(IBootStrapper bootStrapper)
 {
     this.bootStrapper = bootStrapper;
 }