예제 #1
0
            public void Advise(MethodInfoAdviceContext context)
            {
                if (MethodInfoAdviceTests.Expected != Priority)
                {
                    throw new InvalidOperationException();
                }

                MethodInfoAdviceTests.Expected = Priority - 1;
            }
예제 #2
0
        public void Advise(MethodInfoAdviceContext context)
        {
            var methodInfo = context.TargetMethod as MethodInfo;

            if (methodInfo != null && methodInfo.ReturnType != (typeof(void)))
            {
                throw new InvalidOperationException("ExclusiveUpdate can only be applied to void methods");
            }
        }
예제 #3
0
        public void Advise(MethodInfoAdviceContext context)
        {
            var methodInfo = context.TargetMethod as MethodInfo;

            if (methodInfo != null)
            {
                MethodInfos.Add(methodInfo);
            }
        }
예제 #4
0
 public void Advise(MethodInfoAdviceContext context)
 {
 }