8 references to Throw
Microsoft.Extensions.TimeProvider.Testing (8)
FakeTimeProvider.cs (6)
47
_ =
Throw
.IfLessThan(startDateTime.Ticks, 0);
70
_ =
Throw
.IfLessThan(value.Ticks, 0);
107
Throw
.ArgumentOutOfRangeException(nameof(value), $"Cannot go back in time. Current time is {_now}.");
129
_ =
Throw
.IfLessThan(delta.Ticks, 0);
188
public void SetLocalTimeZone(TimeZoneInfo localTimeZone) => _localTimeZone =
Throw
.IfNull(localTimeZone);
207
var 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));