unity-container
How do I register types in assemblies that haven't been loaded with Unity?
I want to load all the types of an Interface so I can call a method on it. However, the assemblies are not referenced a compile time. They will be in the bin folder.[详细]
2023-04-13 01:27 分类:问答C# Unity container Ctor injection
Say we have: class A { ILogger myLog; A(ILogger log) { this.myLog = log; } 开发者_如何学运维... } And we have registered the ILogger interface before in the unity container, e.g.[详细]
2023-04-12 18:03 分类:问答IoC with static and dynamic dependencies
I\'m trying to implement IoC in my app. I have this model: interface IService; interface IComponent; class Service : IService[详细]
2023-04-12 17:03 分类:问答How to inject dependencies into the global.asax.cs
How do I inject dependencies into the global.asax.cs, i.e. the MvcApplication class? Having previously used the Service Locator (anti-)pattern for dependency injection, I am trying to follow best pra[详细]
2023-04-12 13:19 分类:问答Passing client context using Unity in WCF service application
I have a WCF service application (actually, it uses WCF Web API preview 5) that intercepts each request and extracts several header values passed from the client.The idea is that the \'interceptor\' w[详细]
2023-04-12 09:45 分类:问答C# Circular dependencies in Unity with Ctor injection
I kno开发者_高级运维w that the issue of circular dependencies in the contect of dependency injection with prism/unity was dicussed here before.[详细]
2023-04-12 03:08 分类:问答Unity Inject parameter in constructor of property being resolved
I can\'t find a way to inject parameters in this scenario: class Top { private ISome some; public Top() { some = CreateSome(localRuntimeVariable);[详细]
2023-04-11 18:59 分类:问答How to inject N MEF exports into 1 Unity composite service using MefContrib or other technique?
Let\'s say I have 5 separate assemblies with the following (assume the class name is different in each):[详细]
2023-04-11 12:22 分类:问答Unity loadConfiguration failing
I have the following unity construct method: public static IUnityContainer CreateContainer() { UnityContainer container = new UnityContainer();[详细]
2023-04-10 23:39 分类:问答Unity IOC Recursion - A use for interceptors?
So, I\'m trying to solve a problem that I\'m sure someone else has already encountered. Basically, I want the call to my IoC container to recursively resolve the dependencies, but also potentially exe[详细]
2023-04-10 21:57 分类:问答