microsoft / VS-PPT

Productivity Power Tools - a set of Visual Studio extensions improving developer productivity.
http://aka.ms/extendvs
Other
885 stars 146 forks source link

IWaitIndicator #264

Open scottcantwell opened 1 year ago

scottcantwell commented 1 year ago

Getting an error message in the source code stating that the type or namespoace cannot be found for IWaitIndicator.

Where is IWaitIndicator located?

 public sealed class FormattedStringBuilder
    {
        private readonly HtmlMarkupProvider _htmlMarkupProvider;
        private readonly IClassifier _classifier;
        private readonly IClassificationType _defaultClassificationType;
        private readonly IWaitIndicator _waitIndicator;
olegtk commented 1 year ago

IWaitIndicator is not officially supported, it's in Microsoft.VisualStudio.Text.Internal.dll. Try officially supported IUIThreadOperationExecutor instead, it replaced it.

scottcantwell commented 1 year ago

Thank You.

What would be the replacement for the WaitHandle.Wait() method?

image

 using (var waitContext = WaitHelper.Wait(_waitIndicator, "HTML Copy", "Formatting document for copying"))
                {
                    return accurateClassifier.GetAllClassificationSpans(parentSpan, waitContext.CancellationToken);
                }