Castle.MicroKernel.ComponentActivator.WebUserControlComponentActivator
Attempts to dynamically load a UserControl by invoking Page.LoadControl. There are two uses of this class.
1) Add a component to the Kernel and add a VirtualPath attribute specifying the relative path of the .ascx file for the associated UserControl. (easy)
<component id="BasketView" service="Castle.ShoppingCart.IBasketView, Castle.ShoppingCart" type="Castle.ShoppingCart.BasketView, Castle.ShoppingCart" lifestyle="transient" virtualPath="~/Views/BasketView.ascx" />2) Precompile a UserControl and add the pre-compiled class to the Kernel. (hard) Has not been tested with proxies.
namespace Castle.MicroKernel.Proxy
{
public class NotSupportedProxyFactory : IProxyFactory
{
public void AddInterceptorSelector(IModelInterceptorsSelector selector);
public object Create(IKernel kernel, object instance, ComponentModel mode, CreationContext context, params object[] constructorArguments);
public object Create(IProxyFactoryExtension customFactory, IKernel kernel, ComponentModel model, CreationContext context, params object[] constructorArguments);
public bool RequiresTargetInstance(IKernel kernel, ComponentModel model);
public bool ShouldCreateProxy(ComponentModel model);
public NotSupportedProxyFactory();
}
}