Exemplo n.º 1
0
 public SyntaxErrorManager(BackgroundParser backgroundParser, ITextView textView, IShaderLabOptionsService 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);
         }));
 }
 public SyntaxErrorManager(BackgroundParser backgroundParser, ITextView textView, IShaderLabOptionsService 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));
     }));
 }