ivlevAstef / DITranquillity

Dependency injection for iOS (Swift)
MIT License
421 stars 32 forks source link

Handle argument injection with name and tag #160

Closed patskovn closed 3 years ago

patskovn commented 3 years ago

Improved argument injection for custom typing. Currently not work with case:

container.register { MyClass(inj: arg($0) }
    .as(name: "Name", MyProtocol.self)
    .as(tag: MyTag.self, MyProtocol.self)
let arg = AnyArgument(type: MyProtocol.self, value: 1)
let obj: MyProtocol = container.resolve(arg)

PR will fix this and allow usage of arguments with taged and named registrations