18 lines
360 B
C#
18 lines
360 B
C#
using System.Diagnostics;
|
|
|
|
namespace InkBlot;
|
|
|
|
public static class Helpers
|
|
{
|
|
public static T AsNotNull<T>(this T? value) where T : struct
|
|
{
|
|
Debug.Assert(value.HasValue);
|
|
return value.Value;
|
|
}
|
|
|
|
public static T AsNotNull<T>(this T? value) where T : class
|
|
{
|
|
Debug.Assert(value != null);
|
|
return value;
|
|
}
|
|
} |