13 references to IfNull
Shared (7)
BufferWriterPool\BufferWriterPooledObjectPolicy.cs (1)
63
_ = Throw.
IfNull
(obj);
Debugger\DebuggerExtensions.cs (3)
27
_ = Throw.
IfNull
(services);
41
_ = Throw.
IfNull
(services);
55
_ = Throw.
IfNull
(services);
Memoization\MemoizedFunction.cs (2)
68
_function = Throw.
IfNull
(function);
141
_function = Throw.
IfNull
(function);
Pools\PoolFactory.cs (1)
57
_ = Throw.
IfNull
(policy);
Shared.Tests (6)
Throw\ThrowTest.cs (6)
116
var exception = Assert.Throws<ArgumentNullException>(() => Throw.
IfNull
<string>(null!, "paramName"));
123
var exception = Assert.Throws<ArgumentNullException>(() => Throw.
IfNull
<int?>(null!, "paramName"));
131
Assert.Equal(value, Throw.
IfNull
(value, nameof(value)));
138
Assert.Equal(value, Throw.
IfNull
(value, nameof(value)));
146
var exceptionImplicitArgumentName = Record.Exception(() => Throw.
IfNull
(somethingThatIsNull));
148
var exceptionExplicitArgumentName = Record.Exception(() => Throw.
IfNull
(somethingThatIsNull, nameof(somethingThatIsNull)));