CustomExceptionHandler ctor and Unity

Topics: Exception Handling Application Block
Oct 5, 2010 at 1:17 PM

Can anyone please tell me how to "configure" the constructor in Unity (EntLib 5/Unity 2.0) so that I can inject a custom logger?

the idea is this:


public CustomHandler(NameValueCollection attribute, ILogStuff logger)




in the config i'd register the CustomHandler like so:

<register type="CustomHandler" name="ExceptionHandler">

          <param value="NameValueCollection" name="attribute"></param>
          <param value="ILogStuff" name="logger"></param>

the maroon parameter being questionable.

I would of course also register the ILogStuff itfc with the container.

No matter what I do, it's always the single parameter ctor of my CustomHandler class that gets called...any ideas?

Thanks in advance

Oct 5, 2010 at 1:47 PM
Edited Oct 5, 2010 at 2:01 PM

This was answered in the Unity forum -

If you have further questions on this, please post it in the the Unity forum.


Sarah Urmeneta
Global Technology and Solution
Avanade, Inc.