(Also asked in
http://stackoverflow.com/questions/20392340/windsor-castle-3-0-use-icontributecomponentmodelconstruction-to-set-lifestyle-to
)
In Windsor 2.1, I have the following piece of code to change lifestyle of
all services to PerWcfOperation when the code is executed in wcf context:
container.Kernel.ComponentModelBuilder.AddContributor(
new
CustomLifestyleLevelingContributeComponentModelConstruction(typeof
(PerWcfOperationLifestyle))
where CustomLifestyleLevelingContributeComponentModelConstruction is:
public class
CustomLifestyleLevelingContributeComponentModelConstruction :
IContributeComponentModelConstruction
{
private readonly Type customLifestyleType;
private readonly List<LifestyleType> ignoredLifetyles;
public CustomLifestyleLevelingContributeComponentModelConstruction(Type
customLifestyleType)
{
this.customLifestyleType = customLifestyleType;
}
public void ProcessModel(IKernel kernel, ComponentModel model)
{
model.LifestyleType = LifestyleType.Custom;
model.CustomLifestyle = customLifestyleType;
}
}
My problem is that the *class* PerWcfOperationLifestyle has been removed
from Windsor 3.0. Could anyone please show me how I can achieve the same
goal with Windsor 3.x?
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/groups/opt_out.