public UserController(IUserRepositoryProxy proxy, IBootStrapper bootstrapper)
        {
            _proxy = proxy;
            _bootstrapper = bootstrapper;

            _bootstrapper.InitializeApplication();
        }
        public UserController()
        {
            _proxy = new UserRepositoryProxy();
            _bootstrapper = new BootStrapper();

            _bootstrapper.InitializeApplication();
        }
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

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

            _bootstrapper = new BootStrapper();

            _bootstrapper.InitializeApplication();
        }
        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>();
        }
Example #5
0
 public ServiceCoordinator( DaemonConfiguration configuration, IBootStrapper bootStrapper )
 {
     Services = new List<IServiceController>();
     Configuration = configuration;
     RegisterServices();
     BootStrap = bootStrapper;
 }
 public FilesController(IBootStrapper bootstrapper, IFileRepositoryProxy proxy)
 {
     _proxy = proxy;
 }
 public SchemaExportEngine(IBootStrapper bootStrapper)
 {
     this.bootStrapper = bootStrapper;
 }