Bamboo.Prevalence.AlarmClock.Recover C# (CSharp) Метод

Recover() публичный Метод

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
Результат void
		public void Recover(DateTime date)
		{
			if (!_paused)
			{
				throw new InvalidOperationException("The clock must be paused before Recover can be called!");
			}

			if (date > DateTime.Now)
			{
				throw new ArgumentOutOfRangeException("date", date, "Can't recover to a date in the future!");
			}

			_now = date;
		}