public static object CallMethod(MethodJoinPoint jp) { object result = null; PrintJoinPoint(jp); MethodInfo mi = target.GetType().GetMethod(jp.TargetOperationName); result = mi.Invoke(target, jp.Arguments); return(result); }
public static object ValueProperty(MethodJoinPoint jp) { object result = null; IArgDef adef = jp.RealTarget as IArgDef; string expression = adef.Expression; if (expression != null && expression.IndexOf("#") > -1) { Hashtable table = new Hashtable(); table["container"] = adef.Container; table["appSettings"] = ConfigurationManager.AppSettings; result = ExpressionEvaluator.GetValue(null, expression, table); } else { result = jp.Proceed(); } return(result); }