public MatchModel(IMatchModelMapper matchModelMapper, string text)
        {
            _path = null;
            _matchModelMapper = matchModelMapper;

            MatchSubstring substring = new MatchSubstring(text, false);
            List<MatchSubstring> substrings = new List<MatchSubstring> { substring };
            _matchedText = new MatchString(substrings);

            _textBlock = GetTextBlock(_matchedText);
        }
        private static bool MatchedSubtringsEqual(MatchSubstring actualSubstring, MatchSubstring expectedSubstring)
        {
            if (actualSubstring == null && expectedSubstring == null)
            {
                return true;
            }

            if (!(actualSubstring != null && expectedSubstring != null))
            {
                return false;
            }

            return actualSubstring.IsMatched == expectedSubstring.IsMatched &&
                   string.Equals(actualSubstring.Value, expectedSubstring.Value, StringComparison.Ordinal);
        }