C# 클래스 Expl.Itinerary.Parser.TDLParser

Helper class for calling parser to generate an ISchedule object from TDL string.
파일 보기 프로젝트 열기: spoulson/Itinerary 1 사용 예제들

공개 메소드들

메소드 설명
IsValid ( string Text ) : bool

Validate TDL string for syntax.

IsValidDateTime ( string Text ) : bool

Validate Date/time string for syntax. See ParseDateTime() for valid syntax.

IsValidTimeSpan ( string Text ) : bool

Validate timespan string for syntax. See ParseTimeSpan() for valid syntax.

Parse ( string Text ) : ISchedule

Parse TDL string to ISchedule object.

ParseDateTime ( string Text ) : System.DateTime

Parse Date/time string from format: YYYY-MM-DD [hh:mm[:ss[.ffff]]] or hh:mm[:ss[.ffff]]] (omitting date parts assumes current UTC date).

ParseTimeSpan ( string Text ) : System.TimeSpan

Parse timespan string from format: T[[[DD.]hh:]mm:]ss[.ffff]

비공개 메소드들

메소드 설명
GetParser ( string Text ) : TimeDefParser

Instantiate ANTLR-based TDL parser and parse TDL.

메소드 상세

IsValid() 공개 정적인 메소드

Validate TDL string for syntax.
public static IsValid ( string Text ) : bool
Text string TDL string.
리턴 bool

IsValidDateTime() 공개 정적인 메소드

Validate Date/time string for syntax. See ParseDateTime() for valid syntax.
public static IsValidDateTime ( string Text ) : bool
Text string Date/time string.
리턴 bool

IsValidTimeSpan() 공개 정적인 메소드

Validate timespan string for syntax. See ParseTimeSpan() for valid syntax.
public static IsValidTimeSpan ( string Text ) : bool
Text string Timespan string.
리턴 bool

Parse() 공개 정적인 메소드

Parse TDL string to ISchedule object.
public static Parse ( string Text ) : ISchedule
Text string TDL string.
리턴 ISchedule

ParseDateTime() 공개 정적인 메소드

Parse Date/time string from format: YYYY-MM-DD [hh:mm[:ss[.ffff]]] or hh:mm[:ss[.ffff]]] (omitting date parts assumes current UTC date).
public static ParseDateTime ( string Text ) : System.DateTime
Text string Date/time string.
리턴 System.DateTime

ParseTimeSpan() 공개 정적인 메소드

Parse timespan string from format: T[[[DD.]hh:]mm:]ss[.ffff]
public static ParseTimeSpan ( string Text ) : System.TimeSpan
Text string Timespan string.
리턴 System.TimeSpan