예제 #1
0
		/////////////////////////////////////////////////////////////////////////////

		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;
		}
예제 #2
0
		public abstract string DumpMacroMemberAccessExpression( UnnamedMemberAccessExpression exp );
예제 #3
0
		public abstract object EvalUnnamedMemberAccessExpression( object obj, UnnamedMemberAccessExpression exp );
예제 #4
0
		/////////////////////////////////////////////////////////////////////////////

		public override string DumpMacroMemberAccessExpression( UnnamedMemberAccessExpression exp )
		{
			return string.Format( "{0}", exp.MemberName );
		}