All existing throw new exceptions should use the ThrowIf namespace for parameter validation within the entry points of methods. Note that this is more geared towards parameter/object checking for the developer and should not be used for general exceptions that are shown to the user (due to stack modification that may make stack traces less useful).
See here for more information; although in our implementation, we're also doing an additional check to reduce code further and make the methods more helpful.
[x] Add [MethodImpl(MethodImplOptions.NoInlining)] to all ThrowIf members.
All existing
throw new
exceptions should use theThrowIf
namespace for parameter validation within the entry points of methods. Note that this is more geared towards parameter/object checking for the developer and should not be used for general exceptions that are shown to the user (due to stack modification that may make stack traces less useful).See here for more information; although in our implementation, we're also doing an additional check to reduce code further and make the methods more helpful.
[MethodImpl(MethodImplOptions.NoInlining)]
to allThrowIf
members.