I'm converting a Castle/Monorails application into a Unity/Asp.NET MVC one, I'm stuck in trying to converting this component configuration:
<component
id="ComponentBaseConfiguration"
service="MyFakeNamespace.BOL.IConfiguration, MyFakeAppDll"
type="MyFakeNamespace.BOL.ConfigurableConfiguration, MyFakeAppDll">
<parameters>
<!-- Setting Configuration (Dictionary<string,string>)-->
<Config>
<dictionary>
<entry key="localHost">#{LocalHost}</entry>
<entry key="contentHost">#{ContentHost}</entry>
<entry key="virtualDir">#{VirtualDir}</entry>
</dictionary>
</Config>
</parameters>
seems that Unity supports Array but not Dictionary, I would like to do something like this:
<unity>
<containers>
<container>
<types>
<type name="ComponentBaseConfiguration" type="MyFakeNamespace.BOL.IConfiguration, MyFakeAppDll" mapTo="MyFakeNamespace.BOL.ConfigurableConfiguration, MyFakeAppDll">
<typeConfig extensionType="Microsoft.Practices.Unity.Configuration.TypeInjectionElement, Microsoft.Practices.Unity.Configuration">
<property name="Config" propertyType="System.Collections.Generic.Dictionary`2[[System.String, mscorlib], [System.String, mscorlib]],mscorlib">
<dictionary>
<entry key="localHost">127.0.0.1</keyedValue>
<entry key="contentHost">\\content</keyedValue>
<entry key="virtualDir">/</keyedValue>
</dictionary>
</property>
</typeConfig>
</type>
</types>
</container>
</containers></unity>
How can I achieve something like this?