コード例 #1
0
        public InterceptorReference[] SelectInterceptors(ComponentModel model, InterceptorReference[] interceptors)
        {
            ServiceAspectRegistry serviceAspectRegistry = new ServiceAspectRegistry();

            serviceAspectApplier.Apply(model, serviceAspectRegistry);

            InterceptorReference[] interceptorReferences = serviceAspectRegistry.Aspects
                                                           .Select(serviceAspect => InterceptorReference.ForType(serviceAspect))
                                                           .ToArray();

            return(interceptorReferences);
        }
コード例 #2
0
 public void Apply(ComponentModel model, ServiceAspectRegistry serviceAspectRegistry)
 {
     serviceAspectRegistry.Register(typeof(IDefaultAspect <>));
     serviceAspectRegistry.Register(typeof(IExceptionAspect <>));
     serviceAspectRegistry.Register(typeof(ILogAspect <>));
 }