public static ushort UnsignedWithinInclusiveRange(ushort min, ushort max)
 {
     return((ushort)IntegerGenerator.WithinInclusiveRange(min, max));
 }
示例#2
0
 public static T AnyExcept <T>(params T[] except) where T : struct, Enum
 {
     return(EnumFrom <T>(IntegerGenerator.AnyExcept(ValuesAsIntegers(except).ToArray())));
 }
示例#3
0
 public static T Any <T>() where T : struct, Enum
 {
     return(EnumFrom <T>(IntegerGenerator.Any()));
 }
示例#4
0
 private static char Any()
 {
     return((char)IntegerGenerator.WithinInclusiveRange(char.MinValue, char.MaxValue));
 }
示例#5
0
 private static int AnyReasonableLength()
 {
     return(IntegerGenerator.WithinInclusiveRange(1, 10));
 }
        public static IEnumerable <T> AnyNumberOf <T>(Func <T> createItem)
        {
            var numberOfItems = IntegerGenerator.WithinInclusiveRange(0, 10);

            return(numberOfItems.Select(createItem));
        }