AutoInjector | allow auto inject instances for Zenject package | Editor library
kandi X-RAY | AutoInjector Summary
kandi X-RAY | AutoInjector Summary
Package for unity3d which allow auto inject instances for Zenject package.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of AutoInjector
AutoInjector Key Features
AutoInjector Examples and Code Snippets
Community Discussions
Trending Discussions on AutoInjector
QUESTION
So I'm following through some code snippets for AutoInjector and Automapper online, and noticed something that I don't really understand.
In the code, AutoInjector is Registering Automapper for use in this line.
container.Register(() => config.CreateMapper(container.GetInstance));
I noticed that container.GetInstance
isn't having anything passed into it.
After some tinkering, I tried to do var instance = container.GetInstance();
in a console app, but it gives the error The type arguments for method 'Container.GetInstance() cannot be inferred from the usage. Try specifying the type arguments explicitly.
Obviously, the arguments being passed are inferred from the outer method config.CreateMapper()
I was wondering if there was a way to step through the code so I can see what is being passed into container.GetInstance()
. When I step through the code, it just steps over the line and doesn't show me what's being passed into the method.
ANSWER
Answered 2017-Jul-06 at 08:37CreateMapper
expects as its argument a function which takes an input of Type
and returns object
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install AutoInjector
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page