C# Class SleepHunter.Extensions.TimeSpanExtender

Show file Open project: ewrogers/SleepHunter4

Public Methods

Method Description
ToFractionalEnglish ( this timeSpan, bool useShortNotation = false, string format = null ) : string
ToLongEnglish ( this timeSpan, bool includeMinorComponent = true, string format = null ) : string
ToPluralString ( this value, string pluralString, string singularString, string format = null ) : string
ToShortEnglish ( this timeSpan, bool includeMinorComponent = true, string format = null ) : string
TryParse ( string text, System.TimeSpan &value ) : bool

Private Methods

Method Description
ToEnglish ( this timeSpan, bool useShortNotation, bool includeMinorComponent = true, bool isFracitonal = false, string format = null ) : string

Method Details

ToFractionalEnglish() public static method

public static ToFractionalEnglish ( this timeSpan, bool useShortNotation = false, string format = null ) : string
timeSpan this
useShortNotation bool
format string
return string

ToLongEnglish() public static method

public static ToLongEnglish ( this timeSpan, bool includeMinorComponent = true, string format = null ) : string
timeSpan this
includeMinorComponent bool
format string
return string

ToPluralString() public static method

public static ToPluralString ( this value, string pluralString, string singularString, string format = null ) : string
value this
pluralString string
singularString string
format string
return string

ToShortEnglish() public static method

public static ToShortEnglish ( this timeSpan, bool includeMinorComponent = true, string format = null ) : string
timeSpan this
includeMinorComponent bool
format string
return string

TryParse() public static method

public static TryParse ( string text, System.TimeSpan &value ) : bool
text string
value System.TimeSpan
return bool