private ResourceSuggestion CreateSuggestion(Resource resource, ReferenceResource referenceResource)
        {
            var resourceSuggestion = new ResourceSuggestion
            {
                Resource = referenceResource.Resource,
                NumberOfResourceParts         = referenceResource.CountResourceParts(),
                NumberOfMatchingResourceParts = referenceResource.CountMatchingResourceParts(resource.Name),
                IsExactTextMatch = referenceResource.MatchesExactText(resource.Text),
                MatchesLeaf      = referenceResource.MatchesLeaf(GetLeaf(resource.Name)),
            };

            return(resourceSuggestion);
        }
 private static bool SuggestionShouldBeIncludedInResult(ResourceSuggestion resourceSuggestion)
 {
     return(resourceSuggestion.IsExactTextMatch || resourceSuggestion.MatchesLeaf);
 }