hmlongco / Resolver

Swift Ultralight Dependency Injection / Service Locator framework
MIT License
2.14k stars 187 forks source link

Feature Request | Platform specific registering and resolving #172

Open notapplicableio opened 1 year ago

notapplicableio commented 1 year ago

A bit of a potential feature request.

Scenario: I'm working on Multiplatform app and have found ourselves using some #os directives here and there where we want platform specific implementations.

What would you think of adding platform as a parameter, e.g.

register(.iOS) { Foo() } and @Inject(.iOS) private far foo: Foo

Or would you recommend some other way?

PS: Love your work!

majie776 commented 1 year ago

这是来自QQ邮箱的自动回复邮件。   邮件已收到

revo1111 commented 1 year ago

1