Esempio n. 1
0
        public void WhenRetrievingVsServiceWithVersionNumber_ThenCanGetFromCompositionContainer()
        {
            var servicesExports = new ServicesExportProvider(GlobalServiceProvider.Instance);

            var container = new CompositionContainer(servicesExports);

            var shell = container.GetExportedValue<IVsUIShell4>();

            Assert.NotNull(shell);

            var shell2 = GlobalServiceProvider.Instance.GetService<SVsUIShell, IVsUIShell>();

            Assert.Same(shell, shell2);
        }
Esempio n. 2
0
        public void WhenRetrievingDTE_ThenCanGetFromCompositionContainer()
        {
            var servicesExports = new ServicesExportProvider(GlobalServiceProvider.Instance);

            var container = new CompositionContainer(servicesExports);

            var service1 = container.GetExportedValue<DTE>();

            Assert.NotNull(service1);

            var service2 = GlobalServiceProvider.Instance.GetService<SDTE, DTE>();

            Assert.Same(service1, service2);
        }
Esempio n. 3
0
        public void WhenRetrievingServiceProvider_ThenSucceeds()
        {
            var servicesExports = new ServicesExportProvider(GlobalServiceProvider.Instance);

        }