Comments (3)
I've added note to Release with explanation
from container.
Think about this line of code:
RegisterType<ITestService, TestService>(new InjectionFactory(c => new Tes...));
Are you registering a map between ITestService
and TestService
?
Or perhaps you are registering map between ''ITestService'' and InjectionFactory(c => new TestService(new ModelA())
?
If you think about these two, they are mutually exclusive. Either one of these will work but the way you do it will fail.
RegisterType<ITestService>(new InjectionFactory(c => new Tes...));
RegisterType<ITestService, TestService>();
from container.
Viewed that way you are absolutely right. Still, this did work in older versions, but I guess it can be viewed as a bugfix then. I switched all my cases to InjectionConstructor, which is the correct (and shorter/better) solution anyway. Thanks for the clarification.
from container.
Related Issues (20)
- Registration name is ignored when parameterized InjectionConstructor is used HOT 1
- [Performance] Creating UnityContainer is slow HOT 5
- Lifetime management of generic interfaces on child containers HOT 7
- Operation could destabilize the runtime and PEVerify errors HOT 6
- Resolving singletons entirely in the root container HOT 33
- Introduce changelog wiki page HOT 2
- Field not found: object Unity.Lifetime.LifetimeManager.NoValue HOT 5
- Unable to resolve a singleton object from the container
- Legacy InjectionParameterValue HOT 7
- Compiler warning which results in runtime exception HOT 16
- update 5.9.4 error
- Multiple-Constructor Injection using Unity IOC : Behavior has changed HOT 5
- Enabling diagnostic breaks functionality HOT 1
- RegisterInstance() throws incorrect exception
- ResolvedParameter() and OptionalParameter() ignore name of the dependency
- Is CommonServiceLocation replaced with CommonServiceLocator HOT 1
- Intermittent Failure During Resolve Process HOT 1
- VerificationException in TransientLifetimeManager on Azure DevOps HOT 1
- Override MethodProcessor HOT 6
- RegisterType throws InvalidOperationException when no constructor could be matched with injected member
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from container.