天哪,路易丝,我正在尝试用 SM 重新安装一个瘟疫缠身的遗留应用程序,但遇到了各种奇怪的事情。所以我为所有奇怪的问题道歉。
所以我有这个代码
var whatDoIHave = ObjectFactory.Container.WhatDoIHave();
var validator = ObjectFactory.GetInstance<IValidator<ProfileActivityElement>>();
我有什么
IValidator`1<ProfileActivityElement> (IValidator`1<ProfileActivityElement>)
Scoped as: Transient
4b774bc1-b46e-4fc1-95f4-348bb3786dc8
Configured Instance of HSTM.HLC.BusinessLogic.Validators.ProfileActivityElememntValidator, HSTM.HLC.BusinessLogic, Version=13.1.28.895, Culture=neutral, PublicKeyToken=0ecfe41405c30fb3
29c5ff3e-73bd-44bb-9fc8-5a81fa640499 Configured Instance of HSTM.HLC.BusinessLogic.Validators.ProfileActivityElememntValidator, HSTM.HLC.BusinessLogic, Version=13.1.28.895, Culture=neutral, PublicKeyToken=0ecfe41405c30fb3
验证器收到这样的错误
StructureMap Exception Code: 202
No Default Instance defined for PluginFamily HSTM.HLC.BusinessLogic.IValidator`1[[HSTM.HLC.BusinessLogic.HCC.ProfileActivityElement, HSTM.HLC.BusinessLogic, Version=13.1.28.895, Culture=neutral, PublicKeyToken=0ecfe41405c30fb3]], HSTM.HLC.BusinessLogic, Version=13.1.28.895, Culture=neutral, PublicKeyToken=0ecfe41405c30fb3
这是完整的错误,没有内部错误。也许我只是忽略了一些语法错误。谢谢你的帮助,雷夫