-
-
Save casper-rasmussen/8085d95fbe0f7b67062f3f425b6d1c9a to your computer and use it in GitHub Desktop.
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
//Use the IoC container to apply logic to a given abstraction or implementation - here it's Episerver's IContentRepository. | |
container.For<IContentRepository>() | |
//Use DecorateAllWith() to add a ApplyMetricsTimingInterceptor, through Castle.Core dynamic proxies, to apply measurements | |
.DecorateAllWith((c, i) => proxyGenerator.CreateInterfaceProxyWithTarget(i, new ApplyMetricsTimingInterceptor(c.GetInstance<IMetricManager>()))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment