Often times, container usage depends on certain environmental factors. For example, a user session container may not be available unless a user is actually logged in. This leads to extra conditions, nullable services, and other noise that adds complexity to the code.
Suggested Solution
Add a no-op container. This can be used in applications if an actual implementation is not available, without extra checks or nullables - just as if it was a real one.
The Problem
Often times, container usage depends on certain environmental factors. For example, a user session container may not be available unless a user is actually logged in. This leads to extra conditions, nullable services, and other noise that adds complexity to the code.
Suggested Solution
Add a no-op container. This can be used in applications if an actual implementation is not available, without extra checks or nullables - just as if it was a real one.