private async Task <IGenContextBootstrapService> PrepareBootstrapSvcAsync()
        {
            AddService(typeof(ISGenContextBootstrapService), CreateServiceAsync);
            IGenContextBootstrapService bootstrapsvc = await GetServiceAsync(typeof(ISGenContextBootstrapService)) as IGenContextBootstrapService;

            return(bootstrapsvc);
        }
Example #2
0
        protected override async System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            IGenContextBootstrapService bootstrapsvc = await PrepareBootstrapSvc();

            await bootstrapsvc.GenContextInit();

            InitializeCommands();

            await base.InitializeAsync(cancellationToken, progress);
        }
        protected override async System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            IGenContextBootstrapService bootstrapsvc = await PrepareBootstrapSvcAsync();

            var shell = new VsGenShell();

            var language = shell.GetActiveProjectLanguage();

            await bootstrapsvc.GenContextInitAsync(shell, language);

            InitializeCommands();

            await base.InitializeAsync(cancellationToken, progress);
        }