Наследование: ShaderTools.VisualStudio.Core.Parsing.BackgroundParserBase
Пример #1
0
 public SemanticErrorTagger(ITextView textView, BackgroundParser backgroundParser,
     IHlslOptionsService optionsService)
     : base(PredefinedErrorTypeNames.CompilerError, textView, optionsService)
 {
     backgroundParser.SubscribeToThrottledSemanticModelAvailable(BackgroundParserSubscriptionDelay.Medium,
         async x => await InvalidateTags(x.Snapshot, x.CancellationToken));
 }
Пример #2
0
        public EditorNavigationSource(ITextBuffer textBuffer, BackgroundParser backgroundParser, DispatcherGlyphService glyphService)
        {
            _textBuffer = textBuffer;
            _glyphService = glyphService;

            _navigationTargets = new List<EditorTypeNavigationTarget>();

            backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.Medium,
                async x => await ExceptionHelper.TryCatchCancellation(async () => await InvalidateTargets(x.Snapshot, x.CancellationToken)));
        }
Пример #3
0
 public SyntaxErrorManager(BackgroundParser backgroundParser, ITextView textView, IHlslOptionsService optionsService, IServiceProvider serviceProvider, ITextDocumentFactoryService textDocumentFactoryService)
     : base(textView, optionsService, serviceProvider, textDocumentFactoryService)
 {
     backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.OnIdle,
         async x => await ExceptionHelper.TryCatchCancellation(() =>
         {
             RefreshErrors(x.Snapshot, x.CancellationToken);
             return Task.FromResult(0);
         }));
 }