Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IInjector#getProviderFor #142

Open
creynders opened this issue Jun 22, 2013 · 4 comments
Open

IInjector#getProviderFor #142

creynders opened this issue Jun 22, 2013 · 4 comments

Comments

@creynders
Copy link
Member

See http://knowledge.robotlegs.org/discussions/robotlegs-2/2124-mapping-multiple-interfaces-to-same-singleton-instance

and #136

@creynders
Copy link
Member Author

Or come to think of it, neatest would probably be:

injector.map(IFoo).toSingleton(Foo);
injector.map(IBar).toProviderOf(IFoo);

@creynders
Copy link
Member Author

Spiked

What ya think @darscan ?

@peterjoel
Copy link

Or:

injector.map(IFoo).and(IBar).toSingleton(Foo);

Or:

injector.mapAll(IFoo, IBar).toSingleton(Foo);

@creynders
Copy link
Member Author

@peterjoel yeah, I like the first one, but that might be a bit hard to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants