public static IEnumerable IntRange(SqlInt32 minValue, SqlInt32 maxValue) { // Check args if (minValue.IsNull || maxValue.IsNull) { yield break; } // Compute min & max int min = Math.Min(minValue.Value, maxValue.Value); int max = Math.Max(minValue.Value, maxValue.Value); // Generate the set IntRange_Result result = new IntRange_Result(); for (int i = min; i <= max; i++) { result.Value = i; yield return(result); } }
private static void IntRange_FillValues(object obj, out SqlInt32 intValue) { IntRange_Result result = (IntRange_Result)obj; intValue = result.Value; }