The reason is having code like the following (see https://github.com/VladimirLevchuk/EPiProperties for details) :
public class PageBase : PageData
{
[CmsChildren]
public virtual IEnumerable<PageBase> Children { get; internal set; }
}
...
[Test]
public void GetPageModel_ReturnsContentPagesAvailableForCurrentUser()
{
var list = new ListPage
{
ContentPages = new[]
{
new ArticlePage { IsAvailableForCurrentUser = true },
new ArticlePage { IsAvailableForCurrentUser = false }
}
};
var result = Orchestrator.GetContentModel(list);
result.ArticlesList.Items.Count.Should().Be(1);
}
In order to utilize full power of Castle interceptors I'd like several things to be configurable over IoC (see example code below):
// ContentDataInterceptorHandler to be overriden to allow customize interception logic and configure windsor container
x.For<ContentDataInterceptorHandler>().Use<EPiPropertiesContentDataInterceptorHandler>().Ctor<Action<IWindsorContainer>>().Is(ConfigureWindsor);
// Hook is called once when generating proxy type, to filter out properties we can intercept
x.For<ContentDataInterceptorHook>().Singleton().Use<EPiPropertiesContentDataInterceptorHook>();
// and selector works for each generated proxy instance
x.For<ContentProxyInterceptorSelector>().Singleton().Use<EPiPropertiesInterceptorSelector>();
in terms of features I'd like to be able to configure:
IWindsorContainer you use in ContentDataInterceptorHandler
The reason is having code like the following (see https://github.com/VladimirLevchuk/EPiProperties for details) :
In order to utilize full power of Castle interceptors I'd like several things to be configurable over IoC (see example code below):
in terms of features I'd like to be able to configure: