Ejemplo n.º 1
0
 static FluentAspects()
 {
     AspectOptions = new FluentAspectOptions();
     // register built-in necessary interceptors
     AspectOptions.InterceptAll()
     .With <TryInvokeInterceptor>();
     AspectOptions.InterceptMethod <IDisposable>(m => m.Dispose())
     .With <DisposableInterceptor>();
 }
Ejemplo n.º 2
0
 static FluentAspects()
 {
     AspectOptions = new FluentAspectOptions();
     // register built-in ignore interceptors
     AspectOptions
     .NoInterceptType(t => t.Namespace?.StartsWith("WeihanLi.Common.Aspect") == true)
     ;
     // register built-in necessary interceptors
     AspectOptions.InterceptAll()
     .With <TryInvokeInterceptor>();
     AspectOptions.InterceptMethod <IDisposable>(m => m.Dispose())
     .With <DisposableInterceptor>();
 }