Example #1
0
 public bool Check(WordInfo word) => true;
Example #2
0
 public Result <IWordDrawer> GetDrawer(WordInfo wordInfo)
 {
     return(drawers.GetFirst(d => d.Check(wordInfo)));
 }
Example #3
0
 public bool Check(WordInfo wordInfo) => wordInfo.Word.Length < 4;
Example #4
0
 public void DrawWord(Graphics graphics, ImageCreatingOptions options, WordInfo wordInfo, Font font)
 {
     graphics.DrawString(wordInfo.Word, font, options.Brush, wordInfo.Rectangle);
 }
Example #5
0
 /// <summary>
 ///     Sets the drawer with highest priority that checks given wordInfo to draw next word.
 ///     Priority sets as order of drawers in constructor: earlier position means higher priority.
 /// </summary>
 public bool TryGetDrawer(WordInfo wordInfo, out IWordDrawer drawer)
 {
     drawer = drawers.FirstOrDefault(d => d.Check(wordInfo));
     return(drawer != null);
 }