mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-07-10 10:57:12 +00:00
18 lines
399 B
C#
18 lines
399 B
C#
#if NETCOREAPP
|
|
|
|
using System;
|
|
|
|
namespace SabreTools.Serialization.Wrappers
|
|
{
|
|
/// <summary>
|
|
/// Extensions for generic object types
|
|
/// </summary>
|
|
/// <see href="https://stackoverflow.com/a/72775719"/>
|
|
internal static class ObjectExtensions
|
|
{
|
|
public static T ThrowOnNull<T>(this T? value) where T : class => value ?? throw new ArgumentNullException();
|
|
}
|
|
}
|
|
|
|
#endif
|