I created a custom Scope helper object (it just returns DefaultLifetimeScope) to add a custom lifestyle. Then the component is registered as
Component
.For<..>
.LifestyleScoped<CustomScope>()
However, I do not understand how to start a new area / time using CustomScope. The documentation shows the start of a new area with
using (Container.BeginScope()) {
}
but my goal is to create / start / start a specific area, and not for general registration LifestyleScoped(). The new scope should only affect components explicitly registered in CustomScope; not common components or components registered in relation to other types of life in the coverage area.
/ ?
, ; , . Castle Windsor 3.3.
:
Autofac , UoW EF. UoW " ", UoW - .
UoW, [] (, IMOHO) - , HTTP WFC, , . , , " " .
:
BoundTo() ( LifestyleBoundTo()/LifestyleBoundToNearest()) ( ), / . , .