我有一个类,我想通过配置实例化城堡。城堡温莎容器没有正确配线属性
public class MyMappings : IMappings
{
Mapping FirstMapping { get; set; }
Mapping SecondMapping { get; set; }
OtherType ThirdMapping { get; set; }
OtherType FourthMapping { get; set; }
Mapping FifthMapping { get; set; }
OtherType SixMapping { get; set; }
}
在我的配置,我有以下几点:
< component id="mymappings" type="MyMappings, MyAssmebly" >
< parameters>
< firstMapping>${anothercomponentIDForCompomentOftypeMapping}< /firstMapping>
< /parameters>
< /component>
我现在面临的问题是,被分配相同的值,相同类型的所有属性,完全地忽略了参数的名称。这个属性是可选的,我只是想初始化其中的一个值。
感谢,
请格式化代码块 – 2010-04-20 15:37:58