Exemple #1
0
            public bool CanInvokeRename(
                [NotNullWhen(true)] out TrackingSession trackingSession,
                bool isSmartTagCheck = false,
                bool waitForResult   = false,
                CancellationToken cancellationToken = default
                )
            {
                // This needs to be able to run on a background thread for the diagnostic.

                trackingSession = this.TrackingSession;
                if (trackingSession == null)
                {
                    return(false);
                }

                return(TryGetSyntaxFactsService(out var syntaxFactsService) &&
                       TryGetLanguageHeuristicsService(out var languageHeuristicsService) &&
                       trackingSession.CanInvokeRename(
                           syntaxFactsService,
                           languageHeuristicsService,
                           isSmartTagCheck,
                           waitForResult,
                           cancellationToken
                           ));
            }
Exemple #2
0
            public bool CanInvokeRename(out TrackingSession trackingSession, bool isSmartTagCheck = false, bool waitForResult = false, CancellationToken cancellationToken = default(CancellationToken))
            {
                // This needs to be able to run on a background thread for the diagnostic.

                trackingSession = this.TrackingSession;
                if (trackingSession == null)
                {
                    return(false);
                }

                ISyntaxFactsService syntaxFactsService;

                return(TryGetSyntaxFactsService(out syntaxFactsService) &&
                       trackingSession.CanInvokeRename(syntaxFactsService, isSmartTagCheck, waitForResult, cancellationToken));
            }
            public bool CanInvokeRename(out TrackingSession trackingSession, bool isSmartTagCheck = false, bool waitForResult = false, CancellationToken cancellationToken = default(CancellationToken))
            {
                // This needs to be able to run on a background thread for the diagnostic.

                trackingSession = this.TrackingSession;
                if (trackingSession == null)
                {
                    return false;
                }

                ISyntaxFactsService syntaxFactsService;
                IRenameTrackingLanguageHeuristicsService languageHeuristicsService;
                return TryGetSyntaxFactsService(out syntaxFactsService) && TryGetLanguageHeuristicsService(out languageHeuristicsService) &&
                    trackingSession.CanInvokeRename(syntaxFactsService, languageHeuristicsService, isSmartTagCheck, waitForResult, cancellationToken);
            }