是否有Delphi的DI框架使用[Dependency]等属性?

mjn*_*mjn 4 delphi attributes dependency-injection inversion-of-control

是否有可能,如果是,Delphi(Win32)中的依赖注入容器的实现支持"自定义属性" - 基于注入,看起来像

TDiExample = class(TObject)
private
  [Dependency]
  AOther: ISomeInterface

...
end;
Run Code Online (Sandbox Code Playgroud)

(请参阅.Net对应的依赖注入和.NET属性,以及/sf/ask/56881961/ for Delphi Win32 DI框架)

到目前为止,我已经看到了使用直接调用依赖注入容器的示例,例如:

var
  AOther: ISomeInterface
...
  AOther := DiContainer.Get(ISomeInterface) as ISomeInterface;
Run Code Online (Sandbox Code Playgroud)

Dan*_*eti 5

对的,这是可能的.我的简单DI容器可以在下一个版本中执行此操作,并且还会有许多其他改进.查看当前版本http://code.google.com/p/delphidicontainer/