7 references to IfOutOfRange
Shared (1)
BufferWriterPool\BufferWriter.cs (1)
121
_ = Throw.
IfOutOfRange
(count, 0, _buffer.Length - WrittenCount);
Shared.Tests (6)
Throw\IntegerTests.cs (6)
93
var exception = Assert.Throws<ArgumentOutOfRangeException>(() => Throw.
IfOutOfRange
(-1, 0, 1, "foo"));
97
exception = Assert.Throws<ArgumentOutOfRangeException>(() => Throw.
IfOutOfRange
(2, 0, 1, "foo"));
101
Assert.Equal(0, Throw.
IfOutOfRange
(0, 0, 1, "foo"));
102
Assert.Equal(1, Throw.
IfOutOfRange
(1, 0, 1, "foo"));
175
var exceptionImplicitArgumentName = Record.Exception(() => Throw.
IfOutOfRange
(Zero, 1, 2));
177
var exceptionExplicitArgumentName = Record.Exception(() => Throw.
IfOutOfRange
(Zero, 1, 2, nameof(Zero)));