예제 #1
0
        public static bool TryCreate <T>(T value, out NotNull <T> notNull)
        {
            if (value == null)
            {
                notNull = default;
                return(false);
            }

            notNull = new NotNull <T>(value);
            return(true);
        }
예제 #2
0
 public static NotNull <T> EnsureNotNull <T>(this NotNull <T> value) => value;
예제 #3
0
 public static NotNull <T> AsNotNull <T>(this NotNull <T> value) where T : struct => value;