C# Class DotNetWorkQueue.Time.BaseTime

Base server time module
Inheritance: IGetTime
Exibir arquivo Open project: blehnen/DotNetWorkQueue

Protected Properties

Property Type Description
Configuration DotNetWorkQueue.Configuration.BaseTimeConfiguration
Log ILog
Offset System.TimeSpan
ServerOffsetObtained System.DateTime

Public Methods

Method Description
GetCurrentUtcDate ( ) : System.DateTime

Gets the current UTC date.

Protected Methods

Method Description
BaseTime ( ILogFactory log, BaseTimeConfiguration configuration ) : System

Initializes a new instance of the BaseTime class.

GetTime ( ) : System.DateTime

Gets the time as a UTC date

TimeExpired ( ) : bool

Returns true if the cached time offset has expired

Method Details

BaseTime() protected method

Initializes a new instance of the BaseTime class.
protected BaseTime ( ILogFactory log, BaseTimeConfiguration configuration ) : System
log ILogFactory The log.
configuration DotNetWorkQueue.Configuration.BaseTimeConfiguration The configuration.
return System

GetCurrentUtcDate() public method

Gets the current UTC date.
public GetCurrentUtcDate ( ) : System.DateTime
return System.DateTime

GetTime() protected abstract method

Gets the time as a UTC date
protected abstract GetTime ( ) : System.DateTime
return System.DateTime

TimeExpired() protected method

Returns true if the cached time offset has expired
protected TimeExpired ( ) : bool
return bool

Property Details

Configuration protected_oe property

The configuration
protected BaseTimeConfiguration,DotNetWorkQueue.Configuration Configuration
return DotNetWorkQueue.Configuration.BaseTimeConfiguration

Log protected_oe property

The log
protected ILog Log
return ILog

Offset protected_oe property

The current server offset compared to local time
protected TimeSpan,System Offset
return System.TimeSpan

ServerOffsetObtained protected_oe property

Last time the server offset was calculated
protected DateTime,System ServerOffsetObtained
return System.DateTime