Exemple #1
0
        public IEnumerable <Pair <IOccurrence, MatchingInfo> > GetMatchingOccurrences(
            IIdentifierMatcher matcher,
            INavigationScope scope,
            GotoContext gotoContext,
            Func <bool> checkForInterrupt)
        {
            ApplicableGeneratorsCache applicableGeneratorsCache =
                gotoContext.GetData(GotoGeneratorController.ApplicableGeneratorsCacheKey);

            Debug.Assert(applicableGeneratorsCache != null, "applicableGeneratorsCache != null");

            foreach (IGenerator generator in applicableGeneratorsCache.GetApplicableGenerators())
            {
                string name     = generator.Name;
                string typeName = generator.GetType().Name;

                bool matches = matcher.Matches(name) || matcher.Matches(typeName);

                if (matches)
                {
                    yield return(Pair.Of(
                                     (IOccurrence) new GeneratorOccurrence(generator),
                                     new MatchingInfo(matcher, typeName)
                                     ));
                }
            }
        }
Exemple #2
0
 public IEnumerable <MatchingInfo> FindMatchingInfos(
     IIdentifierMatcher matcher,
     INavigationScope scope,
     GotoContext gotoContext,
     Func <bool> checkForInterrupt)
 {
     yield break;
 }
Exemple #3
0
 public bool IsApplicable(INavigationScope scope, GotoContext gotoContext, IIdentifierMatcher matcher)
 {
     return(scope is SolutionNavigationScope);
 }