private string GetSubstringByCond(char peek, ConditionFunc Condition)//Condition is a regex pattern string { StringBuilder str = new StringBuilder(); str.Append(peek); while (MoveNext()) { if (Condition(chars.Current)) { str.Append(chars.Current); } else { dont_move = true; return(str.ToString()); } } dont_move = false; return(str.ToString()); }
public WaitForCondition(ConditionFunc conditionFunc) { mConditionFunc = conditionFunc; }
public Wait(ConditionFunc untilFunc) { Debug.Assert(untilFunc != null); this.untilFunc = untilFunc; }
public Condition(ConditionFunc conditionFunc) { this.conditionFunc = conditionFunc; }
public virtual bool Evaluate(Dictionary <int, int> State) { return(ConditionFunc.Invoke(State)); }
private static bool checkAdjacents( int tileNumber, ConditionFunc condition) { return(findAdjacents(tileNumber).Any(adjacent => condition(adjacent))); }