Inheritance: IReAttachUi
        private async Task <object> CreateReAttachUiAsync(IAsyncServiceContainer container, CancellationToken cancellationToken, Type serviceType)
        {
            var service = new ReAttachUi();
            await service.InitializeAsync(this, _history, cancellationToken);

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

            await base.InitializeAsync(cancellationToken, progress);

            Reporter = Reporter ?? new ReAttachTraceReporter();
            History  = History ?? new ReAttachHistory(new ReAttachRegistryRepository(this));
            Ui       = Ui ?? await ReAttachUi.InitAsync(this);

            Debugger = Debugger ?? await ReAttachDebugger.InitAsync(this);

            History.Load();
            Ui.Update();

            var callback = new ServiceCreatorCallback(CreateBusService);

            ((IServiceContainer)this).AddService(typeof(IReAttachBusService), callback);
        }