如何使用Unity容器通过XML配置字典?这有效:
<register type="System.Collections.Generic.Dictionary[string,int]" >
<constructor>
<param name="capacity">
<value value="10" />
</param>
</constructor>
</register>
Run Code Online (Sandbox Code Playgroud)
但我需要能够在XML配置中添加元素.
xml dependency-injection inversion-of-control unity-container