Design patterns·Wiring: injection, containers and lifetimes
the code called a static Current property for the clock or the user, and nothing in the signature admitted it.
Ambient context
Also calledambient dependency, static accessor, current user static
A dependency reached through static, implicit state — the current time, the current user, the current transaction — rather than passed in. It reads beautifully and is the same trade as a service locator with the indirection removed: hidden coupling, tests that must set and reset global state, and behaviour that depends on what ran before. The two cases people most regret are the clock and the current principal, both of which are trivially injectable.