我的类型接受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>