C# Class Expl.Auxiliary.IntSpec

Shorthand input string to represent lists and ranges of integers.
Acceptable IntSpec operator syntax in order of precedence: n/i !n n-m n,m,o Index values much be greater than zero. Throw exception on invalid format or number range. TODO: Consider converting IntSpec parser to ANTLR parser?
Afficher le fichier Open project: spoulson/Itinerary

Méthodes publiques

Méthode Description
IsValidIntSpec ( string SpecString ) : bool

Check if string is valid IntSpec syntax.

Parse ( string SpecString ) : IEnumerable

Parse IntSpec and generate enumeration of integers.

Parse ( string SpecString, int MinValue, int MaxValue ) : IEnumerable

Parse IntSpec string and clip ranges by min/max values.

Private Methods

Méthode Description
ParseTerm ( string SpecString, int MinValue, int MaxValue ) : IEnumerable

Parse single term of a comma-separated series.

Method Details

IsValidIntSpec() public static méthode

Check if string is valid IntSpec syntax.
public static IsValidIntSpec ( string SpecString ) : bool
SpecString string IntSpec string.
Résultat bool

Parse() public static méthode

Parse IntSpec and generate enumeration of integers.
public static Parse ( string SpecString ) : IEnumerable
SpecString string IntSpec string.
Résultat IEnumerable

Parse() public static méthode

Parse IntSpec string and clip ranges by min/max values.
public static Parse ( string SpecString, int MinValue, int MaxValue ) : IEnumerable
SpecString string IntSpec string.
MinValue int Minimum inclusive range.
MaxValue int Maximum inclusive range.
Résultat IEnumerable