我正在尝试使用 .Net 驱动程序Neo4jClient为Neo4j实现对象模型。我收到编译错误
这种类型在不同的泛型实例化
'IRelationshipAllowingParticipantNode<Person>'
和'IRelationshipAllowingParticipantNode<Company>'
. 在此版本的 F# 中不允许这样做。
这是这些接口的实现(来自 Neo4jClient 源代码)
public interface IRelationshipAllowingParticipantNode<out TNode>
{
}
public interface IRelationshipAllowingSourceNode<out TNode>
: IRelationshipAllowingParticipantNode<TNode>
{
}
public interface IRelationshipAllowingTargetNode<out TNode>
: IRelationshipAllowingParticipantNode<TNode>
{
}
这是我没有编译的类
type FollowRelationship(target) =
inherit Relationship(target)
interface IRelationshipAllowingSourceNode<Person>
interface IRelationshipAllowingTargetNode<Company>
override this.RelationshipTypeKey
with get() = "follow"
怎么会在这里?我怎样才能避免这个错误?我可以使用 F# 中的 Neo4jClient 库吗?