C# Class Bamboo.Prevalence.AlarmClock

A clock that can be used by a prevalent system for all its date/time related functions.
ファイルを表示 Open project: bamboo/Bamboo.Prevalence Class Usage Examples

Public Methods

Method Description
AlarmClock ( ) : System

Creates a new clock.

Pause ( ) : void

Pauses the clock. The property Now will keep on returning the same value until Resume or Recover gets called.

You should not call this method. It is used internally by the prevalence engine to execute a command as if in a specific moment in time.

PauseAt ( System.DateTime date ) : void

This method can be used for testing date sensitive code.

You should not call this method in production code. It's meant to be used in test cases only.

Recover ( System.DateTime date ) : void

Sets the clock to a specific DateTime value. This method can only be called when paused.

You should not call this method. It is used internally by the prevalence engine to execute a command as if in a specific moment in time.

Resume ( ) : void

Resumes the clock. The property Now returns to its normal behavior.

You should not call this method. It is used internally by the prevalence engine to execute a command as if in a specific moment in time.

Method Details

AlarmClock() public method

Creates a new clock.
public AlarmClock ( ) : System
return System

Pause() public method

Pauses the clock. The property Now will keep on returning the same value until Resume or Recover gets called.
You should not call this method. It is used internally by the prevalence engine to execute a command as if in a specific moment in time.
public Pause ( ) : void
return void

PauseAt() public method

This method can be used for testing date sensitive code.
You should not call this method in production code. It's meant to be used in test cases only.
public PauseAt ( System.DateTime date ) : void
date System.DateTime the specific date/time value the clock should be set to, /// this will be the value returned by
return void

Recover() public method

Sets the clock to a specific DateTime value. This method can only be called when paused.
You should not call this method. It is used internally by the prevalence engine to execute a command as if in a specific moment in time.
public Recover ( System.DateTime date ) : void
date System.DateTime the specific date/time value the clock should be set to, /// this will be the value returned by
return void

Resume() public method

Resumes the clock. The property Now returns to its normal behavior.
You should not call this method. It is used internally by the prevalence engine to execute a command as if in a specific moment in time.
public Resume ( ) : void
return void