开发者

StructureMap error (No Default Instance defined...)

My type accepts 3 decimals as arguments to the constructor, which I am attempting to set in the StructureMap.config XML file (see below).

Why do I get the following error?

{"StructureMap Exception Code: 202\nNo Default Instance defined for PluginFamily System.Decimal, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"}

Config file:

 <?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="MyTyp开发者_Python百科e, MyAssembly"                                                     
arg1="1m"
       arg2 = "1m"
       arg3 = "1m" />  
    </StructureMap>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜