public IMethodReturn Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
        {
            Console.WriteLine("方法名:{0}", input.MethodBase.Name);
            Console.WriteLine("参数:");
            for (var i = 0; i < input.Arguments.Count; i++)
            {
                Console.WriteLine("{0}={1}", input.Arguments.ParameterName(i), input.Arguments[i].ToString());
            }
            
            
            //Console.WriteLine("返回类型:{0}", input.MethodBase.MemberType.GetTypeCode().ToString());
            Console.WriteLine("返回类型:{0}", ((MethodInfo)(input.MethodBase)).ReturnType.FullName);

            Console.WriteLine("执行前");
            var retValue = getNext()(input, getNext);
            if (retValue.Exception == null)
            {
                Console.WriteLine("没有异常");
            }
            else
            {
                Console.WriteLine("有异常{0}", retValue.Exception.Message);
                retValue.Exception = null;
            }
            Console.WriteLine("执行后");
            return retValue;
        } 

更多 
0上一篇安装了MVC1后,仍然不能加载MVC项目,可以尝试使用devenv /setup命令。下一篇摘抄怎样激发技术人员的创新力?.主题推荐unity 

 

posted on 2014-04-13 20:46  醉意人间  阅读(826)  评论(0编辑  收藏  举报