Ejemplo n.º 1
0
        void CreatePatternMacherAndBuffer()
        {
            buffer = new BufferOfFixedSize <int>(7);

            Predicate <int> IsNum   = ch => 0 <= ch - '0' && ch - '0' < 10;
            Predicate <int> IsComma = ch => ch == ',';

            List <Predicate <int> > conditions = new List <Predicate <int> > {
                IsNum, IsComma, IsNum, IsNum, IsNum, IsNum, IsNum
            };

            patternMacher = new PatternMacher <int>(conditions, buffer);
        }
Ejemplo n.º 2
0
 public PatternMacher(List <Predicate <T> > conditions, BufferOfFixedSize <T> testedInput)
 {
     this.testedInput = testedInput;
     this.conditions  = conditions;
 }