本文整理汇总了C#中NodeReference类的典型用法代码示例。如果您正苦于以下问题:C# NodeReference类的具体用法?C# NodeReference怎么用?C# NodeReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NodeReference类属于命名空间,在下文中一共展示了NodeReference类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ExhaustMergeAppendStepToNodeQuery
public void ExhaustMergeAppendStepToNodeQuery()
{
var query = new NodeReference(123).OutV<object>().ExhaustMerge();
Assert.IsInstanceOf<IGremlinNodeQuery<object>>(query);
Assert.AreEqual("g.v(p0).outV.exhaustMerge", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:7,代码来源:ExhaustMergeStepTests.cs
示例2: InShouldAppendStepToGremlinQueryWithNoFilter
public void InShouldAppendStepToGremlinQueryWithNoFilter()
{
var query = new NodeReference(123).In<object>("REL");
Assert.AreEqual("g.v(p0).in(p1)", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
Assert.AreEqual("REL", query.QueryParameters["p1"]);
}
开发者ID:Readify,项目名称:Neo4jClient,代码行数:7,代码来源:BasicStepsTests.cs
示例3: GremlinDistinctAppendStepToRelationshipQuery
public void GremlinDistinctAppendStepToRelationshipQuery()
{
var query = new NodeReference(123).OutE().GremlinDistinct();
Assert.IsInstanceOf<IGremlinRelationshipQuery>(query);
Assert.AreEqual("g.v(p0).outE.dedup()", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:7,代码来源:GremlinDistinctStepTests.cs
示例4: EmitPropertyShouldAppendStepToTypedRelationshipQuery
public void EmitPropertyShouldAppendStepToTypedRelationshipQuery()
{
var query = new NodeReference(123).OutE<object>().EmitProperty("foo");
Assert.IsInstanceOf<IGremlinRelationshipQuery<object>>(query);
Assert.AreEqual("g.v(p0).outE.foo", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
}
开发者ID:Winsto,项目名称:Neo4jClient,代码行数:7,代码来源:EmitPropertyStepTests.cs
示例5: GremlinDistinctAppendStepToNodeQuery
public void GremlinDistinctAppendStepToNodeQuery()
{
var query = new NodeReference(123).OutV<object>().GremlinDistinct();
Assert.IsInstanceOf<IGremlinNodeQuery<object>>(query);
Assert.AreEqual("g.v(p0).outV.dedup()", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:7,代码来源:GremlinDistinctStepTests.cs
示例6: ClientShouldReturnClientFromReference
public void ClientShouldReturnClientFromReference()
{
var client = Substitute.For<IGraphClient>();
var reference = new NodeReference<object>(123, client);
var node = new Node<object>(new object(), reference);
Assert.AreEqual(client, ((IGremlinQuery)node).Client);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:7,代码来源:NodeTests.cs
示例7: ReadoutRequest
/// <summary>
/// Represents a request for sensor data.
/// </summary>
/// <param name="Types">Readout types to read.</param>
/// <param name="From">From what timestamp readout is desired.</param>
/// <param name="To">To what timestamp readout is desired.</param>
/// <param name="Nodes">Nodes to read.</param>
public ReadoutRequest (ReadoutType Types, DateTime From, DateTime To, NodeReference[] Nodes)
{
this.types = Types;
this.from = From;
this.to = To;
this.nodes = Nodes;
}
开发者ID:mukira,项目名称:Learning-IoT-HTTP,代码行数:14,代码来源:ReadoutRequest.cs
示例8: BackVShouldAppendStep
public void BackVShouldAppendStep()
{
var query = new NodeReference(123).BackV<object>("foo");
Assert.AreEqual("g.v(p0).back(p1)", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
Assert.AreEqual("foo", query.QueryParameters["p1"]);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:7,代码来源:BackTests.cs
示例9: GremlinHasNextAppendStepToTypedRelationshipQuery
public void GremlinHasNextAppendStepToTypedRelationshipQuery()
{
var query = new NodeReference(123).OutE<object>().GremlinHasNext();
Assert.IsInstanceOf<IGremlinRelationshipQuery<object>>(query);
Assert.AreEqual("g.v(p0).outE.hasNext()", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:7,代码来源:GremlinHasNextStepTests.cs
示例10: ExhaustMergeAppendStepToRelationshipQuery
public void ExhaustMergeAppendStepToRelationshipQuery()
{
var query = new NodeReference(123).OutE().ExhaustMerge();
Assert.IsInstanceOf<IGremlinRelationshipQuery>(query);
Assert.AreEqual("g.v(p0).outE.exhaustMerge", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:7,代码来源:ExhaustMergeStepTests.cs
示例11: OutVShouldAppendStepToNodeReference
public void OutVShouldAppendStepToNodeReference()
{
var node = new NodeReference(123);
var query = node.OutV<object>();
Assert.AreEqual("g.v(p0).outV", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:7,代码来源:BasicStepsTests.cs
示例12: GlGraph
// graph constructor is marked INTERNAL because we want the client to use the
// static class factory method CreateGraph(), which redirects here after doing checks.
// For opening existing graphs,
// we provide another method called OpenGraph() which redirects here also.
internal GlGraph(string graph_name)
{
bool creating_new = !GlobalsGraphAdmin.AllGraphs().Contains(graph_name);
_GlNodeRef = GlobalsGraphAdmin.ActiveConnection().CreateNodeReference(graph_name);
if (creating_new)
_GlNodeRef.Set(GlobalsGraphAdmin.GL_GRAPH_FLAG); // format identifier, causes persistence
else
{
// opening an existing graph. Start by initializing the existing nodes
string loop_node_guid = _GlNodeRef.NextSubscript(GlobalsGraphAdmin.GL_NODES_SUBSCRIPT, "");
while (loop_node_guid != "")
{
Guid new_guid = Guid.Empty;
if (Guid.TryParse(loop_node_guid, out new_guid))
AllNodesByGuid.Add(new_guid, new GlGraphNode(this, new_guid));
else
_GlNodeRef.Kill(GlobalsGraphAdmin.GL_NODES_SUBSCRIPT, loop_node_guid); // clean up bad data
loop_node_guid = _GlNodeRef.NextSubscript(GlobalsGraphAdmin.GL_NODES_SUBSCRIPT, loop_node_guid);
}
// now loop again and load the edges
foreach (GlGraphNode loop_node in AllNodes)
{
loop_node.InitializeEdges();
}
}
}
开发者ID:amoun00,项目名称:Contributions,代码行数:35,代码来源:GLGraph.cs
示例13: CypherShouldStartQueryFromCurrentNodeReference
public void CypherShouldStartQueryFromCurrentNodeReference()
{
var graphClient = Substitute.For<IRawGraphClient>();
var reference = new NodeReference(123, graphClient);
var query = reference.StartCypher("foo").Query;
Assert.AreEqual("START foo=node({p0})", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
}
开发者ID:Winsto,项目名称:Neo4jClient,代码行数:8,代码来源:NodeReferenceTests.cs
示例14: LoopVShouldAppendStep
public void LoopVShouldAppendStep()
{
var query = new NodeReference(123).LoopV<object>("foo", 6);
Assert.AreEqual("g.v(p0).loop(p1){ it.loops < p2 }", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
Assert.AreEqual("foo", query.QueryParameters["p1"]);
Assert.AreEqual(6, query.QueryParameters["p2"]);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:8,代码来源:LoopStepTests.cs
示例15: IfThenElseVShouldAppendSteps
public void IfThenElseVShouldAppendSteps()
{
var query = new NodeReference(123).IfThenElse(
new GremlinIterator().OutV<object>().GremlinHasNext(),
null,
null);
Assert.AreEqual("g.v(p0).ifThenElse{it.outV.hasNext()}{}{}", query.QueryText);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:8,代码来源:IfThenElseTests.cs
示例16: InEShouldAppendStepToGremlinQueryWithLabel
public void InEShouldAppendStepToGremlinQueryWithLabel()
{
var query = new NodeReference(123).InE("FOO");
Assert.AreEqual("g.v(p0).inE.filter{ it[p1].equals(p2) }", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
Assert.AreEqual("label", query.QueryParameters["p1"]);
Assert.AreEqual("FOO", query.QueryParameters["p2"]);
}
开发者ID:Winsto,项目名称:Neo4jClient,代码行数:8,代码来源:BasicStepsTests.cs
示例17: AsShouldAppendStepToRelationshipQuery
public void AsShouldAppendStepToRelationshipQuery()
{
var query = new NodeReference(123).OutE().As("foo");
Assert.IsInstanceOf<IGremlinRelationshipQuery>(query);
Assert.AreEqual("g.v(p0).outE.as(p1)", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
Assert.AreEqual("foo", query.QueryParameters["p1"]);
}
开发者ID:Winsto,项目名称:Neo4jClient,代码行数:8,代码来源:AsStepTests.cs
示例18: AsShouldAppendStepToNodeQuery
public void AsShouldAppendStepToNodeQuery()
{
var query = new NodeReference(123).OutV<object>().As("foo");
Assert.IsInstanceOf<IGremlinNodeQuery<object>>(query);
Assert.AreEqual("g.v(p0).outV.as(p1)", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
Assert.AreEqual("foo", query.QueryParameters["p1"]);
}
开发者ID:Winsto,项目名称:Neo4jClient,代码行数:8,代码来源:AsStepTests.cs
示例19: CypherQueryShouldPreserveClientReference
public void CypherQueryShouldPreserveClientReference()
{
var client = Substitute.For<IRawGraphClient>();
var reference = new NodeReference<object>(123, client);
var node = new Node<object>(new object(), reference);
var queryBuilder = (IAttachedReference)node.StartCypher("foo");
Assert.AreEqual(client, queryBuilder.Client);
}
开发者ID:albumprinter,项目名称:Neo4jClient,代码行数:8,代码来源:NodeTests.cs
示例20: CopySplitVShouldMoveInlineBlockVariablesToTheOuterScopeInFinallyQueryUsingStoreV
public void CopySplitVShouldMoveInlineBlockVariablesToTheOuterScopeInFinallyQueryUsingStoreV()
{
var query = new NodeReference(123).CopySplitE(new IdentityPipe().Out<object>("foo").StoreV<object>("xyz"), new IdentityPipe().Out<object>("bar")).Out<object>("baz");
Assert.AreEqual("xyz = [];g.v(p0)._.copySplit(_().out(p1).store(xyz), _().out(p2)).out(p3)", query.QueryText);
Assert.AreEqual(123, query.QueryParameters["p0"]);
Assert.AreEqual("foo", query.QueryParameters["p1"]);
Assert.AreEqual("bar", query.QueryParameters["p2"]);
Assert.AreEqual("baz", query.QueryParameters["p3"]);
}
开发者ID:Winsto,项目名称:Neo4jClient,代码行数:9,代码来源:CopySplitStepTests.cs
注:本文中的NodeReference类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论