IronPython 无法看到我的程序集中的某些类
我在使用 IronPython 中的 Assembly 中的某些类时遇到问题。这是我在脚本中使用的行:
from Comet.Pricing.Parsing import RegexLookupMapper
该类定义为:
public class RegexLookupMapper<T> : SingleValueMapper<string, T>
我在该程序集中导入另一个类没有问题:
from Comet.Pricing.Parsing import QuoteRequest
该类声明如下:
public class QuoteRequest<T> : IQuoteRequest<T> where T : IInstrument
当我在 Comet.Pricing.Parsing 上执行 dir 时,有很多类比程序集中实际的类少。我能看到的所有缺失类的唯一共同点是它们都派生自:
SingleValueMapper<string, T>
派生自另一个命名空间/程序集中的类(也已毫无问题地导入)。
Im having trouble using some of the classes in my Assembly from IronPython. This is the line I am using in my script:
from Comet.Pricing.Parsing import RegexLookupMapper
The class is defined as:
public class RegexLookupMapper<T> : SingleValueMapper<string, T>
I have no problem importing another class in that Assembly:
from Comet.Pricing.Parsing import QuoteRequest
The class is declared as follows:
public class QuoteRequest<T> : IQuoteRequest<T> where T : IInstrument
When I do a dir on Comet.Pricing.Parsing there are a lot less classes than are actually in the assembly. The only thing I can see in common with all the missing classes is that they all derive from:
SingleValueMapper<string, T>
which derives from a class in another namespace/assembly (which has also been imported with no problems).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明缺少基类的依赖项。
It turned out a dependency of a base class was missing.