C# Class Scriban.Helpers.ScriptTimeSpan

Represents a timespan equivalent to TimeSpan.
显示文件 Open project: lunet-io/scriban Class Usage Examples

Public Methods

Method Description
FromDays ( double days ) : ScriptTimeSpan
FromHours ( double hours ) : ScriptTimeSpan
FromMilliseconds ( double milli ) : ScriptTimeSpan
FromMinutes ( double minutes ) : ScriptTimeSpan
FromSeconds ( double seconds ) : ScriptTimeSpan
Parse ( string text ) : ScriptTimeSpan
ScriptTimeSpan ( System.TimeSpan value ) : System

Initializes a new instance of the ScriptTimeSpan struct.

ToString ( ) : string

Private Methods

Method Description
EvaluateBinaryExpression ( ScriptBinaryExpression expression, ScriptTimeSpan left, ScriptDate right ) : object
EvaluateBinaryExpression ( ScriptBinaryExpression expression, ScriptTimeSpan left, ScriptTimeSpan right ) : object
IComparable ( object obj ) : int
IScriptCustomType ( Type destinationType, object &outValue ) : bool
IScriptCustomType ( ScriptBinaryExpression expression, object left, object right ) : object
IScriptCustomType ( ScriptUnaryExpression expression ) : object
Register ( ScriptObject builtins ) : void

Method Details

FromDays() public static method

public static FromDays ( double days ) : ScriptTimeSpan
days double
return ScriptTimeSpan

FromHours() public static method

public static FromHours ( double hours ) : ScriptTimeSpan
hours double
return ScriptTimeSpan

FromMilliseconds() public static method

public static FromMilliseconds ( double milli ) : ScriptTimeSpan
milli double
return ScriptTimeSpan

FromMinutes() public static method

public static FromMinutes ( double minutes ) : ScriptTimeSpan
minutes double
return ScriptTimeSpan

FromSeconds() public static method

public static FromSeconds ( double seconds ) : ScriptTimeSpan
seconds double
return ScriptTimeSpan

Parse() public static method

public static Parse ( string text ) : ScriptTimeSpan
text string
return ScriptTimeSpan

ScriptTimeSpan() public method

Initializes a new instance of the ScriptTimeSpan struct.
public ScriptTimeSpan ( System.TimeSpan value ) : System
value System.TimeSpan The value.
return System

ToString() public method

public ToString ( ) : string
return string