/// <summary> /// Initializes a new instance of the <see cref="TimeSetter"/> class. /// </summary> /// <param name="timeProvider">The time provider to set as current TimeProvider.</param> public TimeSetter(TimeProvider timeProvider) { Contract.Requires(timeProvider != null); previousProvider = TimeProvider.Current; TimeProvider.Current = timeProvider; }
/// <summary> /// Initializes a new instance of the <see cref="TimeSetter"/> class. /// </summary> /// <param name="timeProvider">The time provider to set as current TimeProvider.</param> public TimeSetter(TimeProvider timeProvider) { previousProvider = TimeProvider.Current; TimeProvider.Current = timeProvider; }