Created
August 21, 2015 12:48
-
-
Save straubt1/ade2e17f5cedfb93fe50 to your computer and use it in GitHub Desktop.
AOPinIoC_DataInstaller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DataInstaller : IWindsorInstaller | |
{ | |
public void Install(IWindsorContainer container, IConfigurationStore store) | |
{ | |
var isProd = ConfigurationManager.AppSettings["IsProduction"] == "True"; | |
container.Register(Component.For<ExceptionAspect>()); | |
container.Register(Component.For<TimingAspect>()); | |
var iProjData = Component.For<IProjectData>().ImplementedBy<ProjectDataLocal>(); | |
iProjData.Interceptors(typeof(ExceptionAspect)); | |
if (!isProd) | |
{ | |
iProjData.Interceptors(typeof(TimingAspect)); | |
} | |
container.Register(iProjData); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment