8 references to Throw
Microsoft.Extensions.TimeProvider.Testing (8)
FakeTimeProvider.cs (6)
47_ = Throw.IfLessThan(startDateTime.Ticks, 0); 70_ = Throw.IfLessThan(value.Ticks, 0); 107Throw.ArgumentOutOfRangeException(nameof(value), $"Cannot go back in time. Current time is {_now}."); 129_ = Throw.IfLessThan(delta.Ticks, 0); 188public void SetLocalTimeZone(TimeZoneInfo localTimeZone) => _localTimeZone = Throw.IfNull(localTimeZone); 207var timer = new Timer(this, Throw.IfNull(callback), state);
Timer.cs (2)
36_ = Throw.IfOutOfRange(dueTimeMs, -1, MaxSupportedTimeout, nameof(dueTime)); 37_ = Throw.IfOutOfRange(periodMs, -1, MaxSupportedTimeout, nameof(period));