public void Before(
            [Argument(Source.Arguments)] object[] args,
            //[Argument(Source.Attributes)] Attribute[] attrs,
            [Argument(Source.Instance)] object _this,
            [Argument(Source.Method)] MethodBase method,
            [Argument(Source.Name)] string name,
            [Argument(Source.ReturnType)] Type retType,
            [Argument(Source.ReturnValue)] object retVal,
            [Argument(Source.Target)] Func <object[], object> target,
            [Argument(Source.Type)] Type hostType
            )
        {
            base.LogArguments(args, BeforeExecuted);
            ///base.LogAttributes(attrs, BeforeExecuted);
            base.LogInstance(_this, BeforeExecuted);
            base.LogMethod(method, BeforeExecuted);
            base.LogName(name, BeforeExecuted);
            base.LogReturnType(retType, BeforeExecuted);
            base.LogReturnValue(retVal, BeforeExecuted);
            base.LogTarget(target, BeforeExecuted);
            base.LogType(hostType, BeforeExecuted);

            TestLog.Write(BeforeExecuted);
        }
Exemple #2
0
        public void After(
            [Argument(Source.Arguments)] object[] args,
            [Argument(Source.Triggers)] Attribute[] attrs,
            [Argument(Source.Instance)] object _this,
            [Argument(Source.Metadata)] MethodBase method,
            [Argument(Source.Name)] string name,
            [Argument(Source.ReturnType)] Type retType,
            [Argument(Source.ReturnValue)] object retVal,
            [Argument(Source.Target)] Func <object[], object> target,
            [Argument(Source.Type)] Type hostType
            )
        {
            base.LogArguments(args, AfterExecuted);
            base.LogAttributes(attrs, AfterExecuted);
            base.LogInstance(_this, AfterExecuted);
            base.LogMethod(method, AfterExecuted);
            base.LogName(name, AfterExecuted);
            base.LogReturnType(retType, AfterExecuted);
            base.LogReturnValue(retVal, AfterExecuted);
            base.LogTarget(target, AfterExecuted);
            base.LogType(hostType, AfterExecuted);

            TestLog.Write(AfterExecuted);
        }