C# Class Bamboo.Prevalence.AlarmClock

A clock that can be used by a prevalent system for all its date/time related functions.
Afficher le fichier Open project: bamboo/Bamboo.Prevalence Class Usage Examples

Méthodes publiques

Méthode 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 méthode

Creates a new clock.
public AlarmClock ( ) : System
Résultat System

Pause() public méthode

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
Résultat void

PauseAt() public méthode

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
Résultat void

Recover() public méthode

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
Résultat void

Resume() public méthode

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
Résultat void