Exemplo n.º 1
0
 public static object AroundTargetMethod(JoinPoint jp)
 {
     //~ System.Console.WriteLine("joinpoint : " + jp);
     object result = jp.Proceed();
     //~ System.Console.WriteLine("result : " + result);
     return result;
 }
Exemplo n.º 2
0
 public static object Interceptor(JoinPoint jp)
 {
     // Console.WriteLine("intercepted : " + jp);
     object result = jp.Proceed();
     // Console.WriteLine("result : " + result);
     return result;
 }
Exemplo n.º 3
0
 public static object YourMethodCallInterceptor(JoinPoint jp)
 {
     Write(++indent, "-> method call [{0}]", jp);
     object result = jp.Proceed();
     Write(indent--, "<- method call [{0}]", jp);
     return result;
 }
Exemplo n.º 4
0
 public static object YourConstructorCallInterceptor(JoinPoint jp)
 {
     Write(++indent, "-> constructor call [{0}]", jp);
     object result = jp.Proceed();
     Write(indent--, "<- constructor call [{0}]", jp);
     return result;
 }
Exemplo n.º 5
0
 public static object AroundTargetMethodWithException(JoinPoint jp)
 {
     try {
         return jp.Proceed();
     } catch (Exception) {
         //Silent
         return null;
     }
 }
Exemplo n.º 6
0
 public static object AroundTargetMethod(JoinPoint jp)
 {
     int result = (int)jp.Proceed();
     return result * 2;
 }
Exemplo n.º 7
0
 public static object InterceptorPrimitiveRead(JoinPoint jp)
 {
     return 5;
 }
Exemplo n.º 8
0
	private static void PrintJoinPoint(JoinPoint jp)
	{
		Console.WriteLine("joinpoint : {0}", jp);
	}
Exemplo n.º 9
0
 public static object Interceptor(JoinPoint jp)
 {
     return jp.Proceed();
 }