jammycakes / factoryfactory

Yet another IOC container for .NET, designed from the ground up to support the ASP.NET Core DI abstractions.
MIT License
0 stars 1 forks source link

Fix transient and untracked lifecycles. #23

Closed jammycakes closed 5 years ago

jammycakes commented 5 years ago

Transient and untracked lifecycles should create one instance per injection, not one per request as is the case in version 1.0.1. Although Microsoft's documentation specifies that they should be one per injection, one per request also passes the unit tests. This should probably be raised as an issue with Microsoft.

Note however that the behaviour of the Scoped lifecycle is correct as implemented. These are per-container. Some posts suggest that they are per-request, but changing it thusly causes the unit tests to break.

jammycakes commented 5 years ago