#nullable enable using System; namespace Flow.Launcher.Infrastructure { public static class Helper { /// /// http://www.yinwang.org/blog-cn/2015/11/21/programming-philosophy /// public static T NonNull(this T? obj) { if (obj == null) { throw new NullReferenceException(); } else { return obj; } } public static void RequireNonNull(this T obj) { if (obj == null) { throw new NullReferenceException(); } } } }