public static IAsyncEnumerable<int> Range(int start,int count,int step)
{
if ( start < 0 )
{
throw new ArgumentOutOfRangeException("start","start must be greater or equal to zero");
}
if ( count < 0 )
{
throw new ArgumentOutOfRangeException("count","count must be greater or equal to zero");
}
if ( step < 1 )
{
throw new ArgumentOutOfRangeException("step", "step must be greater than zero");
}
return RangeCore(start, count, step).ToAsync();
}