Feb
23
comment MS Unity: Resolve auto-registered types
No problem mate, just sorry for taking so long to come back with the solution.
Feb
23
revised MS Unity: Resolve auto-registered types
added 401 characters in body
Feb
23
revised MS Unity: Resolve auto-registered types
added 401 characters in body
Feb
22
revised MS Unity: Resolve auto-registered types
edited body
Feb
22
revised MS Unity: Resolve auto-registered types
added 12 characters in body
Feb
22
revised MS Unity: Resolve auto-registered types
added 198 characters in body
Feb
22
revised MS Unity: Resolve auto-registered types
added 213 characters in body
Feb
22
answered MS Unity: Resolve auto-registered types
Feb
21
comment MS Unity: Resolve auto-registered types
Without specifying a name you won't be able to accomplish what you want. I'll take a look at that attribute I told you, but be aware that you will have to resolve the instances by name once you use it.
Feb
21
comment MS Unity: Resolve auto-registered types
The registration by convention is meant to be used in simple scenarios. Some specific cases, like registrations with constructor injection, are not that easy to handle. Sorry mate. I didn't had the time to take a look at this for you. In the mean time you could avoid registration by convention under the namespaces of the conflicting classes and use the explicit registration. I'll try my best to find some time to fiddle with this. Maybe tomorrow I'll be able to work a solution for you!
Feb
19
comment MS Unity: Resolve auto-registered types
Another way is to create an attribute that enables you to specify the name of the instance, then you just have to hook in the Unity build policies and register that specific instance with the name given in the attribute. Sounds amazingly worth to try. I may take a look at it once I get to home (in office right now).
Feb
19
comment MS Unity: Resolve auto-registered types
That is why you have a method for registering each interface with a name. If you want to have 3 different instances for a single interface, then you have to register each one manually using that method. Sorry, but this is the only way you will achieve what you want. You may want to take a look on MEF. It comes with the framework and I think it supports what you need out of the box.
Feb
19
comment MS Unity: Resolve auto-registered types
If you take a closer look, you will see that only concrete classes are registered within the container. The only interface registered in the container is the default IUnityContainer reference. Are you implementing interfaces in those classes (TestClass1, etc)? Also, you can't have more than one class registered for the same interface, so if you're implementing ITestable in those three TestClasses it won't work. Post the code for the classes registered in the container so we can understand better what's going on.
Jan
30
revised Merging Multiple Text Files - StreamWriter Not Writing One File?
deleted 13 characters in body
Jan
30
revised Merging Multiple Text Files - StreamWriter Not Writing One File?
deleted 5 characters in body
Jan
30
answered Merging Multiple Text Files - StreamWriter Not Writing One File?
Jul
2
comment CodeMirror: Particular lines readonly
Pretty straight forward! I've just added some minor tweaks in order to still be able to delete the content between two non consecutive lines even if the user selects the read-only lines. Thanks a lot!
Jul
2
accepted CodeMirror: Particular lines readonly
Jul
1
asked CodeMirror: Particular lines readonly
Dec
7
awarded Popular Question
1 2 3 4