예제 #1
0
        internal bool AddMiss(Hint hint)
        {
            if (Misses.Any(m => m.Text == hint.Text) ||
                Matches.Any(m => m.Text == hint.Text))
            {
                return(false);
            }

            Misses.Add(hint.Clone());

            return(true);
        }
예제 #2
0
        internal bool AddMatch(Hint hint, TokenEnumerator enumerator)
        {
            if (Matches.Any(m => m.Text == hint.Text))
            {
                return(false);
            }

            Matches.Add(new HintMatch
            {
                Text     = hint.Text,
                Optional = hint.Optional,
                Location = enumerator.Location.Clone()
            });

            return(true);
        }