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
See ProCoSys#16. Related to #686, but pulled out as a separate bug because of the somewhat breaking changes.
It started with a bug that Configure.DiscoverAndConfigure was hard coded to using BindingLifecycle.Transient, but ended with the realization that Configure does not have to deal with a default lifecycle at all, because
Either
.DiscoverAndConfigure is used, and then the container is created by an ICanCreateContainer. This method can easily set the lifecycle on the container before returning, or
any .With(IContainer container ...) method is used, and then the lifecycle can be set before this method is called.
In the end, the Configure class can be simplified a lot.
The breaking changes are the removal of the Container methods with BindingLifecycle parameters, a compile time change. (If wanted, these can instead be kept and obsoleted, but I don't think that is needed.)
The text was updated successfully, but these errors were encountered:
bnordli
added a commit
to bnordli/Bifrost-statoil
that referenced
this issue
Jan 7, 2017
Instead clients should set the default lifecycle on the container either
before returning from ICanCreateContainer.CreateContainer or before the call to Configure.With.
Original issue: ProCoSys#16
See ProCoSys#16. Related to #686, but pulled out as a separate bug because of the somewhat breaking changes.
It started with a bug that
Configure.DiscoverAndConfigure
was hard coded to usingBindingLifecycle.Transient
, but ended with the realization thatConfigure
does not have to deal with a default lifecycle at all, becauseEither
.DiscoverAndConfigure
is used, and then the container is created by anICanCreateContainer
. This method can easily set the lifecycle on the container before returning, or.With(IContainer container ...)
method is used, and then the lifecycle can be set before this method is called.In the end, the
Configure
class can be simplified a lot.The breaking changes are the removal of the
Container
methods with BindingLifecycle parameters, a compile time change. (If wanted, these can instead be kept and obsoleted, but I don't think that is needed.)The text was updated successfully, but these errors were encountered: