CreateContractedBigIntegerWithLotsOfInformation(uint numberOfDigits) { Contract.Requires <ArgumentException>( numberOfDigits > 0, NumberGenerator.ErrorInvalidNumberOfDigits); Contract.Ensures( Contract.Result <Tuple <BigInteger, DateTime, Guid> >() != null); return(NumberGenerator.CreateBigIntegerWithLotsOfInformation(numberOfDigits)); }
public static BigInteger CreateBigInteger(uint numberOfDigits, CreationOptions options) { var result = NumberGenerator.CreateBigInteger(numberOfDigits); if (options == CreationOptions.CreateOdd && result.IsEven) { result--; } else if (options == CreationOptions.CreateEven && !result.IsEven) { result++; } return(result); }
CreateBigIntegerWithLotsOfInformation(uint numberOfDigits) { return(new Tuple <BigInteger, DateTime, Guid>( NumberGenerator.CreateBigInteger(numberOfDigits), DateTime.UtcNow, Guid.NewGuid())); }