Ejemplo n.º 1
0
        protected override DependencyObject CreateShell()
        {
            //init MEFedMVVM composed
            LocatorBootstrapper.ApplyComposer(this);

            _shellView = Container.GetExportedValue <ShellView>();

            return(_shellView);
        }
Ejemplo n.º 2
0
        public void Initialise(ITextBuffer buffer)
        {
            if (!buffer.Properties.ContainsProperty(typeof(TokenParser)))
            {
                var pluginLogger = (IPluginLogger)ServiceProvider.GetService(typeof(IPluginLogger));

                AppDomain.CurrentDomain.FirstChanceException += (sender, args) => pluginLogger.LogFirstChanceException(args);

                var container = buffer.Properties.GetOrCreateSingletonProperty(() => new CompositionContainer(new AssemblyCatalog(GetType().Assembly)));
                container.ComposeExportedValue(ClassificationRegistry);
                container.ComposeParts();

                var scenarioRunner = ServiceProvider.GetService(typeof(IScenarioRunner)) as IScenarioRunner;
                container.ComposeExportedValue(scenarioRunner);

                LocatorBootstrapper.ApplyComposer(new VisualStudioRuntimeComposer(container));
                LocatorBootstrapper.EnsureLocatorBootstrapper();
            }
        }
        protected override DependencyObject CreateShell()
        {
            LocatorBootstrapper.ApplyComposer(this);

            return(Container.GetExportedValue <MainView>());
        }