public static string Describe(CompositeObjective Objective) { return(ObjectDescriber.Listify( Objective.Objectives.Select(i => ReplaceScore(Describe(i), "number of")), ", ", Objective.Aggregator == Aggregators.AND ? ", and " : ", or ")); }
public static string Describe <T>(CompositeMatcher <T> Matcher, Func <Matcher <T>, string> Describer) { return(ObjectDescriber.Listify( Matcher.Matchers.Select(Describer), ", ", Matcher.Aggregator == Aggregators.AND ? ", and " : ", or ")); }
public static string Describe(SumObjective Objective) { return(string.Format( "sum of {0} is %score%", ObjectDescriber.Listify( Objective.Objectives.Select(i => ReplaceScore(Describe(i), "number of")), ", ", ", and "))); }