예제 #1
0
 public String Print(Counter counter,Word actualWord)
 {
     _counter = counter;
     if (IsTimOrPex())
         return _simpleWordPrinter.Print(actualWord, _resultWord);
     return _wordAndCountPrinter.Print(_counter, actualWord);
 }
예제 #2
0
파일: TimPex.cs 프로젝트: KnutHjelvik/demo
 public Timpex(TimpexPredicate timpexPredicate, CounterPrinter counterPrinter, TimpexPrinter timpexPrinter, Counter counter)
 {
     _timpexPredicate = timpexPredicate;
     _counterPrinter = counterPrinter;
     _timpexPrinter = timpexPrinter;
     _counter = counter;
 }
예제 #3
0
 public virtual string Print(Counter counter)
 {
     _counter = counter;
     if (TryPrintTimPex() || TryPrintTim())
         return _result;
     return _pexPrinter.Print();
 }
예제 #4
0
 public virtual Word HandleWordBasedOnCounter(Counter counter)
 {
     _counter = counter;
        if (TryHandleTimPex() || TryHandleTim())
        return _resultWord;
        return _pexWordFactory.Create();
 }
예제 #5
0
 public virtual bool Matches(Counter counter)
 {
     return counter.Count%3 == 0;
 }
 public virtual string Concatinate(Counter counter, Word word)
 {
     var convertedValue = _textConverter.Convert(counter);
     var wordValue = word.Value();
     return wordValue + " " + convertedValue;
 }
예제 #7
0
 public virtual string Print(Counter counter)
 {
     var value = _textConverter.Convert(counter);
     return value;
 }
예제 #8
0
 public virtual string Print(Counter counter, Word word)
 {
     return _counterAndWordConcatenating.Concatinate(counter,word);
 }
예제 #9
0
 public virtual bool Matches(Counter counter)
 {
     return _timPredicate.Matches(counter) || _pexPredicate.Matches(counter);
 }