Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    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);
    }