コード例 #1
0
        public void SimpleInjector_Resolve_Success()
        {
            var container = new Container();
            container.Register<IMath, Math>();
            ISlowpoke<Container> resolver = new SimpleInjectorResolver();

            resolver.Resolve(typeof(IMath), container);
        }
コード例 #2
0
        public void SimpleInjector_Resolve_Success()
        {
            var container = new Container();

            container.Register <IMath, Math>();
            ISlowpoke <Container> resolver = new SimpleInjectorResolver();

            resolver.Resolve(typeof(IMath), container);
        }
コード例 #3
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            Current.DispatcherUnhandledException += OnDispatcherUnhandledException;

            var containerFactory = new SimpleInjectorContainerFactory();
            var container        = containerFactory.CreateSimpleInjectorContainer();
            var resolver         = new SimpleInjectorResolver(container);

            var startUpWindow = (FuzzyExpertActions)resolver.Resolve(typeof(FuzzyExpertActions));

            startUpWindow.Show();
        }