private IInterceptorCreationStrategy ResolveHowToCreateInterceptor(AspectRegistration aspectRegistration) { IInterceptorCreationStrategy strategy; if (Container == null) { // when container is not specified, always use InstantiateInterceptorDirectlyCreationStrategy // without considering AspectRegistration.KeptInContainer setting strategy = new InstantiateInterceptorDirectlyCreationStrategy(); } else if (aspectRegistration.KeptInContainer) { strategy = new ResolveInterceptorFromContainerCreationStrategy(Container); } else { strategy = new InstantiateInterceptorDirectlyCreationStrategy(); } return(strategy); }
private IInterceptorCreationStrategy ResolveHowToCreateInterceptor(AspectRegistration aspectRegistration) { IInterceptorCreationStrategy strategy; if(Container == null) { // when container is not specified, always use InstantiateInterceptorDirectlyCreationStrategy // without considering AspectRegistration.KeptInContainer setting strategy = new InstantiateInterceptorDirectlyCreationStrategy(); } else if (aspectRegistration.KeptInContainer) { strategy = new ResolveInterceptorFromContainerCreationStrategy(Container); } else { strategy = new InstantiateInterceptorDirectlyCreationStrategy(); } return strategy; }