/// <summary> /// Creates a uniform distribution over strings of digits, with length within the given bounds. /// If <paramref name="maxLength"/> is set to <see langword="null"/>, /// there will be no upper bound on the length, and the resulting distribution will thus be improper. /// </summary> /// <param name="minLength">The minimum possible string length. Defaults to 1.</param> /// <param name="maxLength"> /// The maximum possible sequence length, or <see langword="null"/> for no upper bound on length. /// Defaults to <see langword="null"/>. /// </param> /// <param name="uniformity">The type of uniformity. Defaults to <see cref="DistributionKind.UniformOverValue"/></param> /// <returns>The created distribution.</returns> public static StringDistribution Digits(int minLength = 1, int?maxLength = null, DistributionKind uniformity = DistributionKind.UniformOverValue) { return(StringDistribution.Repeat(DiscreteChar.Digit(), minLength, maxLength, uniformity)); }
private static XElement ToXElement(this DistributionKind distributionKind) { return(new XElement(EdxlDe20Namespace + "DistributionKind", distributionKind.DistributionKindDefault.ToXElement())); }