I have a httpHandler and using Unity 2 I would like to inject a dependency into my HttpHandler.
My code looks like:
public class MyHandler : BaseHandler
{
public MyHandler()
{
}
public IConfigurationManager Configuration
{
get;
set;
}
...
}
Using the web.config I would configure it like this (left out the rest of the config for simplicity) :
<type type="MyHandler">
<typeConfig extensionType="Microsoft.Practices.Unity.Configuration.TypeInjectionElement, Microsoft.Practices.Unity.Configuration">
<property name="Configuration" propertyType="IConfigurationManager">
<dependency/>
</property>
</typeConfig>
</type>
How would I go about doing the same thing using fluent syntax? Everything I have tried so far leaves the property set to null when the handler fires.
Thanks