Esempio n. 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);
        }
Esempio n. 2
0
 public static NotNull <T> EnsureNotNull <T>(this NotNull <T> value) => value;
Esempio n. 3
0
 public static NotNull <T> AsNotNull <T>(this NotNull <T> value) where T : struct => value;