2024-11-29 22:20:46 -05:00
|
|
|
#if NETCOREAPP
|
2024-11-27 23:43:50 -05:00
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
2026-03-18 16:37:59 -04:00
|
|
|
namespace SabreTools.Wrappers
|
2024-11-27 23:43:50 -05:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extensions for generic object types
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <see href="https://stackoverflow.com/a/72775719"/>
|
|
|
|
|
internal static class ObjectExtensions
|
|
|
|
|
{
|
2025-11-11 09:57:38 -05:00
|
|
|
public static TClass ThrowOnNull<TClass>(this TClass? value) where TClass : class
|
2025-11-14 09:06:59 -05:00
|
|
|
=> value ?? throw new ArgumentNullException(nameof(value));
|
2024-11-27 23:43:50 -05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-24 09:31:28 -04:00
|
|
|
#endif
|