예제 #1
0
        public bool Recognize(string text, StateMaschine stateMaschine)
        {
            stateMaschine.RecognizeMode();
            var length = text.Length;

            stateMaschine.TextLength = length;
            for (int i = 0; i < length; i++)
            {
                var character  = text.ToArray()[i];
                var recognized = stateMaschine.Recognize(character);
                if (!recognized)
                {
                    return(false);
                }
            }
            return(stateMaschine.ReachedEndeState);
        }