unity-container
MEF vs Unity import into view model
When using unity you can import the container in the constructor of a view moder per say. But how would I do import a MEF contai开发者_开发知识库ner into a view model to resolve instances?[详细]
2023-04-10 16:46 分类:问答How to find the interface where the method is declared
I\'m using Unity for interception. Because I have many interfaces I\'m forced to using VirtualMethodInterceptor. In my behavior I would like to react only when the method called was declared in the pa[详细]
2023-04-10 06:05 分类:问答Unity: register instance at runtime
I can\'t seem to figure out this one. I have a component which depends on a service. The service has a URL which is only known at runtime. How can I get a Component instance using the container?[详细]
2023-04-09 16:54 分类:问答How to configure unit tests with an IoC container in ASP.NET?
I have configured Unity in my ASP.NET application and the configuration is loaded when the first request is received in Application_BeginRequest. then the Unity container is stored in the Global.ascx[详细]
2023-04-09 13:02 分类:问答When using an IoC container, how to pass dynamic data / objects to a class?
I have an Order class with the below constructor public Order(IProduct product, short count) { this._product = product;[详细]
2023-04-09 08:39 分类:问答Unity run-time resolving?
I have the following code in a console program. interface I { ...; string X { get; }; string Y {get; }; string Z {get; } ...}[详细]
2023-04-09 06:43 分类:问答Startup same .exe file with different app.config 's
I开发者_如何学Pythons there a way (maybe from command line) to start the same exe file twice using a different app config?var configMap = new ExeConfigurationFileMap();[详细]
2023-04-09 04:59 分类:问答Should I use Unity Config file or Code to register types and instances?
Finally started to conf开发者_开发技巧igure an IoC Container! I\'m using Unity and have configured it to have my objects registered using the config file:[详细]
2023-04-08 20:17 分类:问答Hooking Generic Repository With IOC container
I am trying to create a generic repository pattern where i can swtich ORM technogies , But i stumbled upon this problem when trying to hook with IOC container[详细]
2023-04-08 18:36 分类:问答MEF/Unity Dependency Resolution failing on multiple threads
My web application uses Unity for DI. Another section of the webapp uses MEF. The code works fine in a single threaded session. But as soon as I click on the same link from two different web sessions[详细]
2023-04-08 02:02 分类:问答