예제 #1
0
        public override bool InterceptInstead(Invocation invocation, object target, ShapeableExpando extensions, out object resultData)
        {
            _log = ClassLogger.Create(target.GetType());
            var msg = string.Format("Intercept the method {0}, with name {1}.", invocation.Kind, invocation.Name);

            _log.Info(msg);
            resultData = null;
            return(true);
        }
예제 #2
0
        public override bool InterceptBefore(Invocation invocation, object target, ShapeableExpando extensions, out object resultData)
        {
            _log = ClassLogger.Create(target.GetType());
            var msg = string.Format("Intercept the method {0}, with name{1}", invocation.Kind, invocation.Name);

            if (invocation.Arguments.Length > 0)
            {
                msg += string.Format(" that has the following parameters:{0}", invocation.Arguments);
            }
            _log.Info(msg);
            resultData = null;
            return(true);
        }
예제 #3
0
 public override bool InterceptAfter(Invocation invocation, object target, ShapeableExpando extensions,
                                     out object resultData)
 {
     resultData = null;
     return(true);
 }
예제 #4
0
 public override bool InterceptBefore(Invocation invocation, object target, ShapeableExpando extensions,
                                      out object resultData)
 {
     return(base.InterceptBefore(invocation, target, extensions, out resultData));
 }