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