Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 是否可以使用C.NET4.0和Windsor Castle配置embbed字典_C#_.net 4.0_Dictionary_Castle Windsor_Ioc Container - Fatal编程技术网

C# 是否可以使用C.NET4.0和Windsor Castle配置embbed字典

C# 是否可以使用C.NET4.0和Windsor Castle配置embbed字典,c#,.net-4.0,dictionary,castle-windsor,ioc-container,C#,.net 4.0,Dictionary,Castle Windsor,Ioc Container,在带有温莎城堡IoC框架v2.5.3的C.NET4.0中, 是否可以配置embbed字典 我尝试了一些配置,但没有成功 这里是Components.xml文件 这里是componentsprroperties.xml文件: 谢谢:-我以前从未见过这样做。根据,哈希标记语法用于引用配置文件中格式为property.id的另一个属性。你确定你使用的是正确的吗?我认为如果你使用的是字典中的字典,那么温莎的配置问题最少。在我看来,你好像在虐待原始人 <component id

在带有温莎城堡IoC框架v2.5.3的C.NET4.0中, 是否可以配置embbed字典

我尝试了一些配置,但没有成功

这里是Components.xml文件

这里是componentsprroperties.xml文件:


谢谢:-

我以前从未见过这样做。根据,哈希标记语法用于引用配置文件中格式为property.id的另一个属性。你确定你使用的是正确的吗?

我认为如果你使用的是字典中的字典,那么温莎的配置问题最少。在我看来,你好像在虐待原始人
<component
   id="MyComponent"
   service="MyAssembly.IMyInterface,MyAssembly"
   type="MyAssembly.MyClass,MyAssembly">
  <parameters>
    <MyProperty>#{MyComplexDictionaryProperty}</MyProperty>
  </parameters>
</component>
<MyComplexDictionaryProperty>
  <Dictionary
    keyType="MyAssembly.MyEnum1,MyAssembly"
    valueType="... ??? ...">
    <Entry key="MyEnum1Value1">
      <Dictionary
        keyType="MyAssembly.MyEnum2,MyAssembly"
        valueType="System.Int32, mscorlib">
        <Entry key="MyEnum2Value1">1</Entry>
      </Dictionary>
    </Entry>
  </Dictionary>
</MyComplexDictionaryProperty>