public FizzBuzzResult GetResult(int value) { var retval = new FizzBuzzResult() { Value = value}; StringBuilder sb = new StringBuilder(); foreach (var store in storage) { if (store.BitArray[value]) sb.Append(store.Config.Text + " "); } retval.Result = sb.Length == 0 ? value.ToString() : sb.ToString().TrimEnd(); return retval; }
public FizzBuzzResult GetResult(int value) { var retval = new FizzBuzzResult() { Value = value }; StringBuilder sb = new StringBuilder(); foreach (var store in storage) { if (store.BitArray[value]) { sb.Append(store.Config.Text + " "); } } retval.Result = sb.Length == 0 ? value.ToString() : sb.ToString().TrimEnd(); return(retval); }