C# 클래스 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?
파일 보기 프로젝트 열기: spoulson/Itinerary

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
ParseTerm ( string SpecString, int MinValue, int MaxValue ) : IEnumerable

Parse single term of a comma-separated series.

메소드 상세

IsValidIntSpec() 공개 정적인 메소드

Check if string is valid IntSpec syntax.
public static IsValidIntSpec ( string SpecString ) : bool
SpecString string IntSpec string.
리턴 bool

Parse() 공개 정적인 메소드

Parse IntSpec and generate enumeration of integers.
public static Parse ( string SpecString ) : IEnumerable
SpecString string IntSpec string.
리턴 IEnumerable

Parse() 공개 정적인 메소드

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.
리턴 IEnumerable