/
d3h5
/
Code.Translate
Обзор
Документация
Войти
/
d3h5
/
Code.Translate
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/D3Guards/Guard.Null.cs
17 строк
459 B
WORKSTATION-H\mrthe
Добавление D3Guards - защитника от недопустимых параметров
15 май 2025, 12:42
15 май 2025, 12:42
a468230
Код
Авторство
О чём код?
namespace D3Guards; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using static ExceptionHelpers; public static partial class Guard { public static void Null<T>([NotNull] T? obj, [CallerArgumentExpression(nameof(obj))] string? paramName = null, string? message = null) where T : class { if (obj is null) { throw CreateArgumentNullException(paramName, message); } } }