StructureMap错误(未定义默认实例...)

时间:2010-06-30 15:42:52

标签: structuremap

我的类型接受3位小数作为构造函数的参数,我试图在StructureMap.config XML文件中设置它(见下文)。

为什么会出现以下错误?

  

{“StructureMap异常代码:   202 \ n未定义默认实例   PluginFamily System.Decimal,mscorlib,   版本= 2.0.0.0,文化=中立,   公钥= b77a5c561934e089" }

配置文件:

 <?xml version="1.0" encoding="utf-8" ?>    
    <StructureMap MementoStyle="Attribute">  
      <Plugin Assembly="MyAssembly" 
              Type="IMyType" 
              ConcreteKey="MyType"/>

      <DefaultInstance
       PluginType="IMyType, MyAssembly"
       PluggedType="MyType, MyAssembly"                                           
       arg1="1m"
       arg2 = "1m"
       arg3 = "1m"/>  

      <AddInstance
       Key="LateRooms"
       Name="LateRooms"
       PluginType="IMyType, MyAssembly"
       PluggedType="MyType, MyAssembly"                                                     
arg1="1m"
       arg2 = "1m"
       arg3 = "1m" />  
    </StructureMap>

0 个答案:

没有答案
相关问题