private static INavigateToSearchResult ConvertResult(
            bool containsDots, DeclaredSymbolInfo declaredSymbolInfo, Document document,
            PatternMatches matches)
        {
            var matchKind = GetNavigateToMatchKind(containsDots, matches);

            // A match is considered to be case sensitive if all its constituent pattern matches are
            // case sensitive.
            var isCaseSensitive = matches.All(m => m.IsCaseSensitive);
            var kind            = GetItemKind(declaredSymbolInfo);
            var navigableItem   = NavigableItemFactory.GetItemFromDeclaredSymbolInfo(declaredSymbolInfo, document);

            return(new SearchResult(document, declaredSymbolInfo, kind, matchKind, isCaseSensitive, navigableItem));
        }