public ReadResults Parse(IStringReader reader, DispatcherResources resources, out int result) { int start = reader.GetCursor(); ReadResults readResults = reader.ReadInteger(out result); if (readResults.Successful) { if (result < Minimum) { reader.SetCursor(start); return(ReadResults.Failure(CommandError.IntegerTooLow(result, Minimum).WithContext(reader))); } if (result > Maximum) { reader.SetCursor(start); return(ReadResults.Failure(CommandError.IntegerTooHigh(result, Maximum).WithContext(reader))); } } return(readResults); }