C# Class RandomGen.TimeLink

Inheritance: ITime
Show file Open project: aliostad/RandomGen

Public Methods

Method Description
Dates ( System.DateTime min = null, System.DateTime max = null ) : Func

Returns random date gen

Dates ( DateTimeOffset min = null, DateTimeOffset max = null ) : Func

Returns random datetimeoffset gen

Spans ( System.TimeSpan min = null, System.TimeSpan max = null ) : Func

Creates TimeSpan intervals between two optional ranges

Private Methods

Method Description
TimeLink ( RandomLink random ) : System

Method Details

Dates() public method

Returns random date gen
public Dates ( System.DateTime min = null, System.DateTime max = null ) : Func
min System.DateTime if not supplied, DateTime.MinValue is used
max System.DateTime if not supplied, DateTime.MaxValue is used
return Func

Dates() public method

Returns random datetimeoffset gen
public Dates ( DateTimeOffset min = null, DateTimeOffset max = null ) : Func
min DateTimeOffset if not supplied, DateTimeOffset.MinValue is used
max DateTimeOffset if not supplied, DateTimeOffset.MaxValue is used
return Func

Spans() public method

Creates TimeSpan intervals between two optional ranges
public Spans ( System.TimeSpan min = null, System.TimeSpan max = null ) : Func
min System.TimeSpan if null, TimeSpan.Zero
max System.TimeSpan if null, 1 year is used
return Func