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
-[Ambiguous Lifestyles] The registration for ITarget (Async Scoped) maps to the same implementation (InstrumentationTargetDecorator) as the registration for ITarget (Scoped) does, but the registration maps to a different lifestyle. This will cause each registration to resolve to a different instance.
The text was updated successfully, but these errors were encountered:
// Make a derivative of the duplicate decorator and register thisclassDerivative:InstrumentationTargetDecorator{ ...}
container.Register<ITarget,Target>(Lifestyle.Scoped);
container.RegisterDecorator(typeof(ITarget), typeof(InstrumentationTargetDecorator), Lifestyle.Scoped);
container.RegisterDecorator(typeof(ITarget), typeof(ResilienceTargetDecorator), Lifestyle.Scoped);
container.RegisterDecorator(typeof(ITarget), typeof(Derivative), Lifestyle.Scoped);
The details for this bug can be found here: https://stackoverflow.com/questions/69155688/simpleinjector-how-to-reuse-a-decorator-class-more-than-once-in-objects-decora
Error:
The text was updated successfully, but these errors were encountered: