提交 3a37ed27 编写于 作者: M Manish Vasani 提交者: GitHub

Revert "Hookup non-Roslyn view to the document tracking service on a foregrou…" (#15188)

上级 2e14171f
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using Microsoft.CodeAnalysis;
using Microsoft.VisualStudio.LanguageServices.Implementation;
using Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Text.Editor;
using Roslyn.Utilities;
using Microsoft.VisualStudio.TextManager.Interop;
namespace Microsoft.VisualStudio.LanguageServices
{
......@@ -41,15 +40,11 @@ protected override void OnBeforeNonRoslynDocumentWindowShow(IVsWindowFrame frame
return;
}
// Schedule hookup of the non-Roslyn document view on foreground task scheduler.
Task.Factory.SafeStartNew(() =>
var view = GetTextViewFromFrame(frame);
if (view != null)
{
var view = GetTextViewFromFrame(frame);
if (view != null)
{
_documentTrackingService?.OnNonRoslynViewOpened(view);
}
}, CancellationToken.None, ForegroundTaskScheduler);
_documentTrackingService?.OnNonRoslynViewOpened(view);
}
}
private ITextView GetTextViewFromFrame(IVsWindowFrame frame)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册