You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In that case, we need to explicitly set the "LifeStyleType" propertly on the ComponentModel.
I'm not sure what I would set this to - and what else to do - in order to spread the Hybrid lifestyle
public class SingletonEqualizer : IContributeComponentModelConstruction
{
public void ProcessModel(IKernel kernel, ComponentModel model)
{
model.LifestyleType = LifestyleType.Singleton; // what to set this to?
}
}
I've tried below, but there's no ILifestyleManager for PerWebRequest (and I understand Windsor 3 now uses new ScopedLifestyleManager(new WebRequestScopeAccessor()
So how to encapsulate that, I really don't know - something like below, if ScopedLifestyle had a way of specifying the underlying type without newing it up)
Constructor on type 'Castle.MicroKernel.Lifestyle.HybridLifestyleManager`2[[Castle.MicroKernel.Lifestyle.ScopedLifestyleManager, Castle.Windsor, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc],[Castle.MicroKernel.Lifestyle.TransientLifestyleManager, Castle.Windsor, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]]' not found.
The text was updated successfully, but these errors were encountered:
Hey
I can see how to register a single type but we set the entire web site to use PerWebRequest as per this post - http://blog.ploeh.dk/2010/04/26/ChangingWindsorlifestylesafterthefact/
In that case, we need to explicitly set the "LifeStyleType" propertly on the ComponentModel.
I'm not sure what I would set this to - and what else to do - in order to spread the Hybrid lifestyle
I've tried below, but there's no ILifestyleManager for PerWebRequest (and I understand Windsor 3 now uses
new ScopedLifestyleManager(new WebRequestScopeAccessor()
So how to encapsulate that, I really don't know - something like below, if ScopedLifestyle had a way of specifying the underlying type without newing it up)
model.CustomLifestyle = typeof(HybridLifestyleManager<ScopedLifestyleManager>, TransientLifestyleManager>);
Constructor on type 'Castle.MicroKernel.Lifestyle.HybridLifestyleManager`2[[Castle.MicroKernel.Lifestyle.ScopedLifestyleManager, Castle.Windsor, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc],[Castle.MicroKernel.Lifestyle.TransientLifestyleManager, Castle.Windsor, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]]' not found.
The text was updated successfully, but these errors were encountered: