public void Static_Field() { var field = Express.Field(() => _staticField); Enforce.That(field, Represents <ExpressTests>("_staticField")); }
public void Static_Property() { var property = Express.Property(() => StaticProperty); Enforce.That(property, Represents <ExpressTests>("StaticProperty")); }
public void Constructor() { var constructor = Express.Constructor(() => new ExpressTests()); Enforce.That(constructor, Represents <ExpressTests>(".ctor")); }
public void Static_Method() { var method = Express.Method(() => ReferenceEquals(null, null)); Enforce.That(method, Represents <object>("ReferenceEquals")); }
public static TValue GetMemberValue <TValue>(TModel instance, Expression <Func <TModel, TValue> > expression) { var info = Express.MemberWithLambda(expression); return((TValue)Getters[info](instance)); }