delphi - how to pass a parameter from the instantiator to a constructor in the spring4d dependency injection framework?
问题 It's possible to register a class with a parameter expected to be passed from the point of creation? I know it can be done something like this: GlobalContainer.RegisterType<TUserProcessor>.Implements<IUserUpgrader>. AsTransient.DelegateTo( function: TUserProcessor begin Result := TUserProcessor.Create(GetCurrentUser); end ); But there the parameters are binded to the execution context where the container gets registered and not where the object get's intantiated. Something like this it's