///////////////////////////////////////////////////////////////////////////// public override object EvalUnnamedMemberAccessExpression( object objIn, UnnamedMemberAccessExpression exp ) { // ****** // // expression: macro // // when the macro is member access then objIn is the object EXCEPT // for the special case of the object being a method that takes // no arguments and returns an object: // // Func<object> // // which exists so we can store a property "reference" in a macro // and have do as expected -> return the value of the property - // see ETB.CreatePropertyInvoker(...) // Func<object> simpleCall = objIn as Func<object>; if( null != simpleCall ) { object objResult = simpleCall(); CheckNullResult( objResult, objIn, exp.MemberName ); return objResult; } return objIn; }
public abstract string DumpMacroMemberAccessExpression( UnnamedMemberAccessExpression exp );
public abstract object EvalUnnamedMemberAccessExpression( object obj, UnnamedMemberAccessExpression exp );
///////////////////////////////////////////////////////////////////////////// public override string DumpMacroMemberAccessExpression( UnnamedMemberAccessExpression exp ) { return string.Format( "{0}", exp.MemberName ); }