示例#1
0
        protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress)
        {
            Language = new MarkdownLanguage(this);

            var editorFactory = new EditorFactory(this, typeof(MarkdownLanguage).GUID);

            RegisterEditorFactory(editorFactory);

            await JoinableTaskFactory.SwitchToMainThreadAsync();

            _options = (Options)GetDialogPage(typeof(Options));

            Logger.Initialize(this, Vsix.Name);
            ErrorList.Initialize(this);
            CopyAsHtmlCommand.Initialize(this);
            AddCustomStylesheet.Initialize(this);
            GenerateHtml.Initialize(this);
        }
示例#2
0
        protected override void Initialize()
        {
            _options = (Options)GetDialogPage(typeof(Options));

            Logger.Initialize(this, Vsix.Name);
            ErrorList.Initialize(this);
            CopyAsHtmlCommand.Initialize(this);
            AddCustomStylesheet.Initialize(this);
            GenerateHtml.Initialize(this);

            var serviceContainer = this as IServiceContainer;
            var langService      = new MarkdownLanguage(this);

            serviceContainer.AddService(typeof(MarkdownLanguage), langService, true);

            var editorFactory = new EditorFactory(this, typeof(MarkdownLanguage).GUID);

            RegisterEditorFactory(editorFactory);
        }