TimeSpanFunctions Class

Summary

Class which provides NAnt functions for working with time spans.
Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Functions
Base Types
graph BT Type-->Base0["FunctionSetBase"] click Base0 "/api/NAnt.Core/FunctionSetBase" Base0-->Base1["Object"] Type["TimeSpanFunctions"] class Type type-node

Syntax

[FunctionSet("timespan", "Date/Time")]
public class TimeSpanFunctions : FunctionSetBase

Attributes

Type Description
FunctionSetAttribute Indicates that class should be treated as a set of functions.

Constructors

Name Summary
TimeSpanFunctions(Project, PropertyDictionary) Initializes a new instance of the NAnt.Core.Functions.TimeSpanFunctions class.

Properties

Name Value Summary
Project Project
Gets or sets the NAnt.Core.FunctionSetBase.Project that this functionset will reference.
Inherited from FunctionSetBase

Methods

Name Value Summary
FromDays(double) TimeSpan
Returns a System.TimeSpan that represents a specified number of days, where the specification is accurate to the nearest millisecond.
static
FromHours(double) TimeSpan
Returns a System.TimeSpan that represents a specified number of hours, where the specification is accurate to the nearest millisecond.
static
FromMilliseconds(double) TimeSpan
Returns a System.TimeSpan that represents a specified number of milliseconds.
static
FromMinutes(double) TimeSpan
Returns a System.TimeSpan that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.
static
FromSeconds(double) TimeSpan
Returns a System.TimeSpan that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.
static
FromTicks(long) TimeSpan
Returns a System.TimeSpan that represents a specified time, where the specification is in units of ticks.
static
GetDays(TimeSpan) int
Returns the number of whole days represented by the specified System.TimeSpan.
static
GetHours(TimeSpan) int
Returns the number of whole hours represented by the specified System.TimeSpan.
static
GetMilliseconds(TimeSpan) int
Returns the number of whole milliseconds represented by the specified System.TimeSpan.
static
GetMinutes(TimeSpan) int
Returns the number of whole minutes represented by the specified System.TimeSpan.
static
GetSeconds(TimeSpan) int
Returns the number of whole seconds represented by the specified System.TimeSpan.
static
GetTicks(TimeSpan) long
Returns the number of ticks contained in the specified System.TimeSpan.
static
GetTotalDays(TimeSpan) double
Returns the total number of days represented by the specified System.TimeSpan, expressed in whole and fractional days.
static
GetTotalHours(TimeSpan) double
Returns the total number of hours represented by the specified System.TimeSpan, expressed in whole and fractional hours.
static
GetTotalMilliseconds(TimeSpan) double
Returns the total number of milliseconds represented by the specified System.TimeSpan, expressed in whole and fractional milliseconds.
static
GetTotalMinutes(TimeSpan) double
Returns the total number of minutes represented by the specified System.TimeSpan, expressed in whole and fractional minutes.
static
GetTotalSeconds(TimeSpan) double
Returns the total number of seconds represented by the specified System.TimeSpan, expressed in whole and fractional seconds.
static