Exemplo n.º 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            DependencyInjector.AddExtension <MUDependencyInjectionExtension>();
            DependencyInjector.RegisterType <MainWindowViewModel, MainWindowViewModel>();
        }
        protected override void Initialize()
        {
            DependencyInjector.AddExtension <DataDependencyInjectionExtension>();

            DependencyInjector.RegisterType <IFactoriesRepository <FactoryEntity>, FactoriesRepository>();
            DependencyInjector.RegisterType <IFactoriesService, FactoriesService>();
            DependencyInjector.RegisterInstance(new DescartesRobotFactory("Test robot factory", new Size(300, 300)));

            DependencyInjector.RegisterType <IRobotTrajectoryValidationService, RobotDescartesTrajectoryValidationService>();
            DependencyInjector.RegisterType <IServiceHostProvider <IRobotTrajectoryValidationService>, RobotDescartesTrajectoryValidationServiceHost>();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            WriteLine("Start Service");

            DependencyInjector.AddExtension <DependencyOfCacheExtension>();

            var backgroundServiceController = BackgroundServiceController.Instance;

            backgroundServiceController.Start();

            WriteLine("Press any key to stop...");
            ReadKey();

            backgroundServiceController.Stop();
        }
Exemplo n.º 4
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            DependencyInjector.AddExtension <ECUDependencyInjectionExtension>();

            DependencyInjector.RegisterType <DataViewModel, DataViewModel>();
            DependencyInjector.RegisterType <AddFactoryViewModel, AddFactoryViewModel>();
            DependencyInjector.RegisterType <AddRobotViewModel, AddRobotViewModel>();

            DependencyInjector.RegisterType <DashboardViewModel, DashboardViewModel>();

            using (new TRobotDatabaseContext())
            {
            }
        }
Exemplo n.º 5
0
        protected override void Initialize()
        {
            DependencyInjector.AddExtension <UnityDataContainer>();

            DependencyInjector.Register <IBusiness, BusinessClass>(LifetimeEnum.Transcient);
        }
 public static void Init()
 {
     DependencyInjector.AddExtension <UnityBusinessContainer>();
 }