Possibly a stupid question, but during debug I simply want to see the types that have been registered with my Unity container. I have tried going through the container in the watch window, but can’t seem to find what I am looking for? I am expecting there to be a list of registered types somewhere?
Thanks in advance
I think it is in there but it’s pretty buried. Usually I use the following extension:
Then you can write code like this:
You could use this approach or you could wrap or alter the source for the container to add a DebuggerDisplay attribute and a method which uses the above code to iterate through the container contents.
Hope this helps!