public static void AssertNotNull <TValue>(Expression <Func <TValue> > expression, string message = null)
        {
            var metadata = MetadataFactory.MetadataFrom(expression);

            if (metadata.Value == null)
            {
                throw ExceptionNotNull(metadata.Value, metadata.Name, message);
            }
        }
Exemplo n.º 2
0
        public static Metadata <TValue> Assert <TValue>(Expression <Func <TValue> > expression)
        {
            var metadata = MetadataFactory.MetadataFrom(expression);

            if (metadata.Value == null)
            {
                throw ExceptionNotNull(metadata.Value, metadata.Name);
            }

            return(metadata);
        }
Exemplo n.º 3
0
 public static Metadata <TValue> Assert <TValue>(Expression <Func <TValue> > expression)
 {
     return(MetadataFactory.MetadataFrom(expression));
 }
Exemplo n.º 4
0
 public static Metadata <float> Assert(Expression <Func <float> > expression, string name = null)
 => MetadataFactory.MetadataFrom(expression);