code/Kingdom.OrTools.Sat.CodeGeneration.Tests/Utilities/Ranges.cs
/// <summary>
/// Returns the <see cref="IEnumerable{T}"/> Range corresponding to the
/// <paramref name="values"/>. It is important that we return a fresh instance of
/// <see cref="IEnumerable{T}"/> and not the <paramref name="values"/> itself
/// because that may have been a collection other than that, an array, and so on.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="values"></param>
/// <returns></returns>
Returns the  Range corresponding to the
. It is important that we return a fresh instance of
and not the  itself
because that may have been a collection other than that, an array, and so on.
Returns the Range corresponding to the . It is important that we return a fresh instance of and not the itself because that may have been a collection other than that an array and so on .
public static IEnumerable<T> GetRange<T>(params T[] values)
        {
            foreach (var x in values)
            {
                yield return x;
            }
        }
public static IEnumerable < T > GetRange < T > ( params T [ ] values ) { foreach ( var x in values ) { yield return x ; } }
Returns the  Range corresponding to the
.
Returns the Range corresponding to the .
// ReSharper disable once LoopCanBeConvertedToQuery // Yes, we want to Yield Return them individually. // Yes, we do not want to return the given Values instance itself.
None
values
None
typeparam
None