<PackageReference Include="System.Diagnostics.EventLog" Version="11.0.0-preview.6.26359.118" />

System.ExceptionPolyfills

static class ExceptionPolyfills

public static void ThrowIf(bool condition, object instance)

public static void ThrowIf(bool condition, Type type)

public static void ThrowIfLessThan<T>(T value, T other, string paramName = null) where T : IComparable<T>

public static void ThrowIfNull(object argument, string paramName = null)

public static void ThrowIfNullOrEmpty(string argument, string paramName = null)