Is it possible and if yes are there implementations of Dependency Injection containers in Delphi (Win32) which support "custom attribute" - based injection, something looking like
TDiExample = class(TObject)
private
[Dependency]
AOther: ISomeInterface
...
end;
(See Dependency Injection and .NET Attributes for a .Net counterpart, and https://stackoverflow.com/questions/812599/is-there-a-dependency-injection-framework-for-delphi-or-free-pascal for Delphi Win32 DI frameworks)
So far I have seen examples using direct calls to a dependency injection container, like:
var
AOther: ISomeInterface
...
AOther := DiContainer.Get(ISomeInterface) as ISomeInterface;