c# - HttpServiceFactory 接口中的方法太多
问题描述
在我的控制器中,我有这段代码可以正常工作:
var service = HttpServiceFactory.CreateService<IMasterDataService>();
return await service.SetCurrency(pCurrencyDto);
如果我向 IMasterDataServiceDefinition 接口添加一个新方法声明(正确),该接口实现的是 IMasterDataService,我会收到以下错误:
System.TypeInitializationException: The type initializer for
'MethodHelper_47636508.ServiceDefinitions.MasterData.IMasterDataService' threw an exception. --->
System.IndexOutOfRangeException: Index was outside the bounds of the array.
我认为接口或 HttpServiceFactory 中的某处可能存在方法限制。
你能帮忙解决这个问题吗?谢谢!
解决方案
推荐阅读
- python - 试图通过政府网站上的数十万个 pdf 进行网络抓取。想要尽快完成
- reactjs - 在 React 中的数字输入上使用 toFloat 和 setState
- java - Java:将克隆作为函数参数而不是引用传递
- python - 使用正则表达式 pandas 改变年龄
- linux-kernel - PCI 驱动程序失败:在设备上检测到 PCI 总线错误
- angular - 角度获取 web api 数据(在浏览器网络选项卡中,它以 200 ok 响应获取数据)但数据不显示
- javascript - Webpack Loaders - 在 loader 中创建和写入文件
- python - Sklearn 分类器无法使用 Gensim Word2Vec 数据进行训练
- excel - VBA将显示的单元格时间转换为变量分配
- jquery - ASP.NET 的 AJAX 发布问题