Example #1
0
        public static GraphTraversal2 __()
        {
            GraphTraversal2 newGraphTraversal = new GraphTraversal2();

            newGraphTraversal.AddGremlinOperator(new GremlinParentContextOp());
            return(newGraphTraversal);
        }
 public GraphTraversal2 Or(params GraphTraversal2[] orTraversals)
 {
     if (orTraversals.Length == 0)
     {
         //Infix And step
         GraphTraversal2 firstTraversal   = GraphTraversal2.__();
         GraphTraversal2 sencondTraversal = GraphTraversal2.__();
         for (var i = 1; i < GremlinTranslationOpList.Count; i++)
         {
             firstTraversal.AddGremlinOperator(GremlinTranslationOpList[i].Copy());
         }
         for (var i = 1; i < GremlinTranslationOpList.Count; i++)
         {
             GremlinTranslationOpList.RemoveAt(i);
         }
         LastGremlinTranslationOp = GremlinTranslationOpList.First();
         GremlinOrOp newOrOp = new GremlinOrOp(firstTraversal, sencondTraversal);
         AddGremlinOperator(newOrOp);
     }
     else
     {
         AddGremlinOperator(new GremlinOrOp(orTraversals));
     }
     return(this);
 }