/// Takes bytes generated by an underling RandomGenerator and reverses the order in
/// each small window (of configurable size).
///
/// Access to internals is synchronized so a single one of these can be shared.
///
///
public class ReversedWindowGenerator
: IRandomGenerator
{
private readonly IRandomGenerator generator;
private byte[] window;
private int windowCount;
public ReversedWindowGenerator(
IRandomGenerator generator,
int windowSize)
{
if (generator == null)
throw new ArgumentNullException("generator");
if (windowSize < 2)
throw new ArgumentException("Window size must be at least 2", "windowSize");
this.generator = generator;
this.window = new byte[windowSize];
}
///