Delphi Spring DI: Is it possible to delegate interface instantiation without an implementing type?

后端 未结 2 765
面向向阳花
面向向阳花 2021-02-09 06:04

I\'m just getting started with the Delphi Spring Framework and was wondering whether the current version of the DI container somehow allows delegating the construction to a fact

2条回答
  •  悲哀的现实
    2021-02-09 06:44

    Doesn't look like the architecture of the spring framework currently supports it but its certainly feasible. It has been suggested in the spring4d support group and there is interest in the idea.

    There is a generic TFactory class in Spring.DesignPatterns that may be of use in wrapping CreateComObject/COCreateInstance.

提交回复
热议问题