Ejemplo n.º 1
0
 public void ScheduleDeferredCleanupTask(Action <CancellationToken> a)
 {
     _ = _threadingContext.RunWithShutdownBlockAsync(async cancellationToken =>
     {
         await _threadingContext.JoinableTaskFactory.StartOnIdle(
             () => a(cancellationToken),
             VsTaskRunContext.UIThreadNormalPriority);
     });
 }
Ejemplo n.º 2
0
        public AbstractSnippetInfoService(
            IThreadingContext threadingContext,
            Shell.IAsyncServiceProvider serviceProvider,
            Guid languageGuidForSnippets,
            IAsynchronousOperationListenerProvider listenerProvider)
            : base(threadingContext)
        {
            _waiter = listenerProvider.GetListener(FeatureAttribute.Snippets);
            _languageGuidForSnippets = languageGuidForSnippets;
            _threadingContext        = threadingContext;

            _threadingContext.RunWithShutdownBlockAsync((_) => InitializeAndPopulateSnippetsCacheAsync(serviceProvider));
        }