public SocketInitiator(Application application, MessageStoreFactory storeFactory, SessionSettings settings, LogFactory logFactory)
现在第二个参数是一个接口:
namespace QuickFix
{
public interface MessageStoreFactory
{
MessageStore Create(SessionID sessionID);
}
public class MemoryStoreFactory : MessageStoreFactory {...}
}
我试图传递一个接口的实例:
msf1=QuickFix.MemoryStoreFactory()
init=QuickFix.Transport.SocketInitiator(osa, msf1, ss, screenlog)
但是我得到了相当无益的错误
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: expected MessageStoreFactory, got MemoryStoreFactory
有没有办法向C#/ CLR标识我已经传递了一个实现MessageStoreFactory实例的类的Python实例?或者这是其他一些无关的问题吗?