Example #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>();
        }
Example #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();
        }
Example #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())
            {
            }
        }
        protected override void Initialize()
        {
            DependencyInjector.AddExtension <UnityDataContainer>();

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