Add special handling for steps without generic counterpart in GraphTraversal

Some steps are generic methods in __, but not in GraphTraversal. This change 
prevents the methods in __ from trying to call their non-generic counterpart in 
GraphTraversal with a generic type parameter.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/5a5b5b67
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/5a5b5b67
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/5a5b5b67

Branch: refs/heads/TINKERPOP-1752
Commit: 5a5b5b6727faacebbabc25c0a35613526c20ba59
Parents: 5f32731
Author: Florian Hockmann <[email protected]>
Authored: Thu Aug 17 23:38:49 2017 +0200
Committer: florianhockmann <[email protected]>
Committed: Tue Sep 12 16:39:37 2017 +0200

----------------------------------------------------------------------
 gremlin-dotnet/glv/AnonymousTraversal.template  |   2 +-
 gremlin-dotnet/pom.xml                          |  44 ++-
 .../Process/Traversal/GraphTraversal.cs         | 368 +++++++++----------
 .../Process/Traversal/GraphTraversalSource.cs   |  52 +--
 .../src/Gremlin.Net/Process/Traversal/__.cs     | 212 +++++------
 5 files changed, 356 insertions(+), 322 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5a5b5b67/gremlin-dotnet/glv/AnonymousTraversal.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/AnonymousTraversal.template 
b/gremlin-dotnet/glv/AnonymousTraversal.template
index 64a6dbf..d4f99d5 100644
--- a/gremlin-dotnet/glv/AnonymousTraversal.template
+++ b/gremlin-dotnet/glv/AnonymousTraversal.template
@@ -45,7 +45,7 @@ namespace Gremlin.Net.Process.Traversal
         /// </summary>
         public static GraphTraversal<object, <%= method.t2 %>> <%= 
toCSharpMethodName.call(method.methodName) %><%= method.tParam %>(<%= 
method.parameters %>)
         {
-            return new GraphTraversal<object, <%= method.t2 %>>().<%= 
toCSharpMethodName.call(method.methodName) %><%= method.tParam %>(<%= 
method.paramNames %>);
+            return new GraphTraversal<object, <%= method.t2 %>>().<%= 
toCSharpMethodName.call(method.methodName) %><%= method.callGenericTypeArg 
%>(<%= method.paramNames %>);
         }
 <% } %>
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5a5b5b67/gremlin-dotnet/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/pom.xml b/gremlin-dotnet/pom.xml
index 8b869ec..ae534c9 100644
--- a/gremlin-dotnet/pom.xml
+++ b/gremlin-dotnet/pom.xml
@@ -121,7 +121,7 @@ def methodsWithSpecificTypes = ["constant": useE2,
                                 "range": useE2,
                                 "sum": useE2,
                                 "tail": useE2,
-                                "unfold": useE2]
+                                "unfold": useE2]                               
                         
 
 def getCSharpGenericTypeParam = { typeName ->
     def tParam = ""
@@ -147,7 +147,7 @@ def toCSharpType = { name ->
 
 def toCSharpMethodName = { symbol -> (String) 
Character.toUpperCase(symbol.charAt(0)) + symbol.substring(1) }
 
-def getJavaParameterTypeNames = { method ->
+def getJavaGenericTypeParameterTypeNames = { method ->
     def typeArguments = method.genericReturnType.actualTypeArguments;
     return typeArguments.
             collect { (it instanceof Class) ? ((Class)it).simpleName : 
it.typeName }.
@@ -162,6 +162,13 @@ def getJavaParameterTypeNames = { method ->
             }
 }
 
+def getJavaParameterTypeNames = { method ->
+    return method.parameters.
+            collect { param ->
+                param.type.simpleName
+            } 
+}
+
 def toCSharpParamString = { param ->
     csharpParamTypeName = toCSharpType(param.type.simpleName)
     "${csharpParamTypeName} ${param.name}"
@@ -192,6 +199,32 @@ def getParamNames = { parameters ->
         }
 }
 
+def hasMethodNoGenericCounterPartInGraphTraversal = { method ->
+    def parameterTypeNames = getJavaParameterTypeNames(method)
+    if (method.name.equals("fold")) {
+        return parameterTypeNames.size() == 0
+    }
+    if (method.name.equals("limit")) {
+        if (parameterTypeNames.size() == 1) {
+            return parameterTypeNames[0].equals("long")
+        }
+    }
+    if (method.name.equals("range")) {
+        if (parameterTypeNames.size() == 2) {
+            return parameterTypeNames[0].equals("long") && 
parameterTypeNames[1].equals("long")
+        }
+    }
+    if (method.name.equals("tail")) {
+        if (parameterTypeNames.size() == 0) {
+            return true
+        }
+        if (parameterTypeNames.size() == 1) {
+            return parameterTypeNames[0].equals("long")
+        }
+    }
+    return false
+}  
+
 def binding = ["pmethods": P.class.getMethods().
                                  findAll { 
Modifier.isStatic(it.getModifiers()) }.
                                  findAll { 
P.class.isAssignableFrom(it.returnType) }.
@@ -226,7 +259,7 @@ def binding = ["pmethods": P.class.getMethods().
                                         findAll { !it.name.equals("clone") && 
!it.name.equals("iterate") }.
                                         sort { a, b -> a.name <=> b.name }.
                                         collect { javaMethod ->
-                                            def typeNames = 
getJavaParameterTypeNames(javaMethod)
+                                            def typeNames = 
getJavaGenericTypeParameterTypeNames(javaMethod)
                                             def t1 = toCSharpType(typeNames[0])
                                             def t2 = toCSharpType(typeNames[1])
                                             def tParam = 
getCSharpGenericTypeParam(t2)
@@ -240,7 +273,7 @@ def binding = ["pmethods": P.class.getMethods().
                                         findAll { !it.name.equals("__") && 
!it.name.equals("start") }.
                                         sort { it.name }.
                                         collect { javaMethod ->
-                                            def typeNames = 
getJavaParameterTypeNames(javaMethod)
+                                            def typeNames = 
getJavaGenericTypeParameterTypeNames(javaMethod)
                                             def t2 = toCSharpType(typeNames[1])
                                             def tParam = 
getCSharpGenericTypeParam(t2)
                                             def specificTypes = 
methodsWithSpecificTypes.get(javaMethod.name)
@@ -250,7 +283,8 @@ def binding = ["pmethods": P.class.getMethods().
                                             }
                                             def parameters = 
getCSharpParamString(javaMethod)
                                             def paramNames = 
getParamNames(javaMethod.parameters).join(", ")
-                                            return ["methodName": 
javaMethod.name, "t2":t2, "tParam":tParam, "parameters":parameters, 
"paramNames":paramNames]
+                                            def callGenericTypeArg = 
hasMethodNoGenericCounterPartInGraphTraversal(javaMethod) ? "" : tParam
+                                            return ["methodName": 
javaMethod.name, "t2":t2, "tParam":tParam, "parameters":parameters, 
"paramNames":paramNames, "callGenericTypeArg":callGenericTypeArg]
                                         },
                "toCSharpMethodName": toCSharpMethodName]
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5a5b5b67/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
index 80fc46b..b9db513 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -75,9 +75,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the addE step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , Edge > AddE (string edgeLabel)
+        public GraphTraversal< S , Edge > AddE (Direction direction, string 
firstVertexKeyOrEdgeLabel, string edgeLabelOrSecondVertexKey, params object[] 
propertyKeyValues)
         {
-            var args = new List<object> { edgeLabel };
+            var args = new List<object> { direction, 
firstVertexKeyOrEdgeLabel, edgeLabelOrSecondVertexKey, propertyKeyValues };
             Bytecode.AddStep("addE", args);
             return Wrap< S , Edge >(this);
         }
@@ -85,9 +85,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the addE step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , Edge > AddE (Direction direction, string 
firstVertexKeyOrEdgeLabel, string edgeLabelOrSecondVertexKey, params object[] 
propertyKeyValues)
+        public GraphTraversal< S , Edge > AddE (string edgeLabel)
         {
-            var args = new List<object> { direction, 
firstVertexKeyOrEdgeLabel, edgeLabelOrSecondVertexKey, propertyKeyValues };
+            var args = new List<object> { edgeLabel };
             Bytecode.AddStep("addE", args);
             return Wrap< S , Edge >(this);
         }
@@ -115,9 +115,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the addV step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , Vertex > AddV (string vertexLabel)
+        public GraphTraversal< S , Vertex > AddV ()
         {
-            var args = new List<object> { vertexLabel };
+            var args = new List<object> {  };
             Bytecode.AddStep("addV", args);
             return Wrap< S , Vertex >(this);
         }
@@ -125,9 +125,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the addV step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , Vertex > AddV ()
+        public GraphTraversal< S , Vertex > AddV (params object[] 
propertyKeyValues)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { propertyKeyValues };
             Bytecode.AddStep("addV", args);
             return Wrap< S , Vertex >(this);
         }
@@ -135,9 +135,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the addV step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , Vertex > AddV (params object[] 
propertyKeyValues)
+        public GraphTraversal< S , Vertex > AddV (string vertexLabel)
         {
-            var args = new List<object> { propertyKeyValues };
+            var args = new List<object> { vertexLabel };
             Bytecode.AddStep("addV", args);
             return Wrap< S , Vertex >(this);
         }
@@ -185,9 +185,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the barrier step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Barrier ()
+        public GraphTraversal< S , E > Barrier (int maxBarrierSize)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { maxBarrierSize };
             Bytecode.AddStep("barrier", args);
             return Wrap< S , E >(this);
         }
@@ -195,9 +195,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the barrier step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Barrier (int maxBarrierSize)
+        public GraphTraversal< S , E > Barrier ()
         {
-            var args = new List<object> { maxBarrierSize };
+            var args = new List<object> {  };
             Bytecode.AddStep("barrier", args);
             return Wrap< S , E >(this);
         }
@@ -255,9 +255,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the by step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > By (ITraversal traversal, object 
comparator)
+        public GraphTraversal< S , E > By (T token)
         {
-            var args = new List<object> { traversal, comparator };
+            var args = new List<object> { token };
             Bytecode.AddStep("by", args);
             return Wrap< S , E >(this);
         }
@@ -265,9 +265,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the by step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > By ()
+        public GraphTraversal< S , E > By (string key)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { key };
             Bytecode.AddStep("by", args);
             return Wrap< S , E >(this);
         }
@@ -275,9 +275,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the by step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > By (object comparator)
+        public GraphTraversal< S , E > By (object function)
         {
-            var args = new List<object> { comparator };
+            var args = new List<object> { function };
             Bytecode.AddStep("by", args);
             return Wrap< S , E >(this);
         }
@@ -285,9 +285,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the by step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > By (Order order)
+        public GraphTraversal< S , E > By ()
         {
-            var args = new List<object> { order };
+            var args = new List<object> {  };
             Bytecode.AddStep("by", args);
             return Wrap< S , E >(this);
         }
@@ -295,9 +295,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the by step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > By (string key, object comparator)
+        public GraphTraversal< S , E > By (ITraversal traversal)
         {
-            var args = new List<object> { key, comparator };
+            var args = new List<object> { traversal };
             Bytecode.AddStep("by", args);
             return Wrap< S , E >(this);
         }
@@ -305,9 +305,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the by step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > By (ITraversal traversal)
+        public GraphTraversal< S , E > By (object function, object comparator)
         {
-            var args = new List<object> { traversal };
+            var args = new List<object> { function, comparator };
             Bytecode.AddStep("by", args);
             return Wrap< S , E >(this);
         }
@@ -315,9 +315,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the by step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > By (object function, object comparator)
+        public GraphTraversal< S , E > By (string key, object comparator)
         {
-            var args = new List<object> { function, comparator };
+            var args = new List<object> { key, comparator };
             Bytecode.AddStep("by", args);
             return Wrap< S , E >(this);
         }
@@ -325,9 +325,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the by step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > By (T token)
+        public GraphTraversal< S , E > By (Order order)
         {
-            var args = new List<object> { token };
+            var args = new List<object> { order };
             Bytecode.AddStep("by", args);
             return Wrap< S , E >(this);
         }
@@ -335,9 +335,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the by step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > By (object function)
+        public GraphTraversal< S , E > By (object comparator)
         {
-            var args = new List<object> { function };
+            var args = new List<object> { comparator };
             Bytecode.AddStep("by", args);
             return Wrap< S , E >(this);
         }
@@ -345,9 +345,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the by step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > By (string key)
+        public GraphTraversal< S , E > By (ITraversal traversal, object 
comparator)
         {
-            var args = new List<object> { key };
+            var args = new List<object> { traversal, comparator };
             Bytecode.AddStep("by", args);
             return Wrap< S , E >(this);
         }
@@ -365,9 +365,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the choose step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Choose<E2> (TraversalPredicate 
choosePredicate, ITraversal trueChoice)
+        public GraphTraversal< S , E2 > Choose<E2> (ITraversal choiceTraversal)
         {
-            var args = new List<object> { choosePredicate, trueChoice };
+            var args = new List<object> { choiceTraversal };
             Bytecode.AddStep("choose", args);
             return Wrap< S , E2 >(this);
         }
@@ -375,9 +375,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the choose step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Choose<E2> (object choiceFunction)
+        public GraphTraversal< S , E2 > Choose<E2> (ITraversal 
traversalPredicate, ITraversal trueChoice)
         {
-            var args = new List<object> { choiceFunction };
+            var args = new List<object> { traversalPredicate, trueChoice };
             Bytecode.AddStep("choose", args);
             return Wrap< S , E2 >(this);
         }
@@ -385,9 +385,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the choose step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Choose<E2> (ITraversal choiceTraversal)
+        public GraphTraversal< S , E2 > Choose<E2> (ITraversal 
traversalPredicate, ITraversal trueChoice, ITraversal falseChoice)
         {
-            var args = new List<object> { choiceTraversal };
+            var args = new List<object> { traversalPredicate, trueChoice, 
falseChoice };
             Bytecode.AddStep("choose", args);
             return Wrap< S , E2 >(this);
         }
@@ -395,9 +395,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the choose step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Choose<E2> (ITraversal 
traversalPredicate, ITraversal trueChoice)
+        public GraphTraversal< S , E2 > Choose<E2> (TraversalPredicate 
choosePredicate, ITraversal trueChoice)
         {
-            var args = new List<object> { traversalPredicate, trueChoice };
+            var args = new List<object> { choosePredicate, trueChoice };
             Bytecode.AddStep("choose", args);
             return Wrap< S , E2 >(this);
         }
@@ -405,9 +405,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the choose step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Choose<E2> (ITraversal 
traversalPredicate, ITraversal trueChoice, ITraversal falseChoice)
+        public GraphTraversal< S , E2 > Choose<E2> (TraversalPredicate 
choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
         {
-            var args = new List<object> { traversalPredicate, trueChoice, 
falseChoice };
+            var args = new List<object> { choosePredicate, trueChoice, 
falseChoice };
             Bytecode.AddStep("choose", args);
             return Wrap< S , E2 >(this);
         }
@@ -415,9 +415,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the choose step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Choose<E2> (TraversalPredicate 
choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
+        public GraphTraversal< S , E2 > Choose<E2> (object choiceFunction)
         {
-            var args = new List<object> { choosePredicate, trueChoice, 
falseChoice };
+            var args = new List<object> { choiceFunction };
             Bytecode.AddStep("choose", args);
             return Wrap< S , E2 >(this);
         }
@@ -485,9 +485,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the dedup step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Dedup (Scope scope, params string[] 
dedupLabels)
+        public GraphTraversal< S , E > Dedup (params string[] dedupLabels)
         {
-            var args = new List<object> { scope, dedupLabels };
+            var args = new List<object> { dedupLabels };
             Bytecode.AddStep("dedup", args);
             return Wrap< S , E >(this);
         }
@@ -495,9 +495,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the dedup step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Dedup (params string[] dedupLabels)
+        public GraphTraversal< S , E > Dedup (Scope scope, params string[] 
dedupLabels)
         {
-            var args = new List<object> { dedupLabels };
+            var args = new List<object> { scope, dedupLabels };
             Bytecode.AddStep("dedup", args);
             return Wrap< S , E >(this);
         }
@@ -545,9 +545,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the filter step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Filter (ITraversal filterTraversal)
+        public GraphTraversal< S , E > Filter (TraversalPredicate predicate)
         {
-            var args = new List<object> { filterTraversal };
+            var args = new List<object> { predicate };
             Bytecode.AddStep("filter", args);
             return Wrap< S , E >(this);
         }
@@ -555,9 +555,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the filter step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Filter (TraversalPredicate predicate)
+        public GraphTraversal< S , E > Filter (ITraversal filterTraversal)
         {
-            var args = new List<object> { predicate };
+            var args = new List<object> { filterTraversal };
             Bytecode.AddStep("filter", args);
             return Wrap< S , E >(this);
         }
@@ -565,9 +565,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the flatMap step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > FlatMap<E2> (ITraversal 
flatMapTraversal)
+        public GraphTraversal< S , E2 > FlatMap<E2> (object function)
         {
-            var args = new List<object> { flatMapTraversal };
+            var args = new List<object> { function };
             Bytecode.AddStep("flatMap", args);
             return Wrap< S , E2 >(this);
         }
@@ -575,9 +575,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the flatMap step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > FlatMap<E2> (object function)
+        public GraphTraversal< S , E2 > FlatMap<E2> (ITraversal 
flatMapTraversal)
         {
-            var args = new List<object> { function };
+            var args = new List<object> { flatMapTraversal };
             Bytecode.AddStep("flatMap", args);
             return Wrap< S , E2 >(this);
         }
@@ -605,9 +605,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the from step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > From (ITraversal fromVertex)
+        public GraphTraversal< S , E > From (string fromStepLabel)
         {
-            var args = new List<object> { fromVertex };
+            var args = new List<object> { fromStepLabel };
             Bytecode.AddStep("from", args);
             return Wrap< S , E >(this);
         }
@@ -615,9 +615,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the from step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > From (string fromStepLabel)
+        public GraphTraversal< S , E > From (ITraversal fromVertex)
         {
-            var args = new List<object> { fromStepLabel };
+            var args = new List<object> { fromVertex };
             Bytecode.AddStep("from", args);
             return Wrap< S , E >(this);
         }
@@ -625,21 +625,21 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the group step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Group (string sideEffectKey)
+        public GraphTraversal< S , IDictionary<K, V> > Group<K, V> ()
         {
-            var args = new List<object> { sideEffectKey };
+            var args = new List<object> {  };
             Bytecode.AddStep("group", args);
-            return Wrap< S , E >(this);
+            return Wrap< S , IDictionary<K, V> >(this);
         }
 
         /// <summary>
         ///     Adds the group step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , IDictionary<K, V> > Group<K, V> ()
+        public GraphTraversal< S , E > Group (string sideEffectKey)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { sideEffectKey };
             Bytecode.AddStep("group", args);
-            return Wrap< S , IDictionary<K, V> >(this);
+            return Wrap< S , E >(this);
         }
 
         /// <summary>
@@ -665,29 +665,29 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the groupV3d0 step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > GroupV3d0 (string sideEffectKey)
+        public GraphTraversal< S , IDictionary<K, V> > GroupV3d0<K, V> ()
         {
-            var args = new List<object> { sideEffectKey };
+            var args = new List<object> {  };
             Bytecode.AddStep("groupV3d0", args);
-            return Wrap< S , E >(this);
+            return Wrap< S , IDictionary<K, V> >(this);
         }
 
         /// <summary>
         ///     Adds the groupV3d0 step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , IDictionary<K, V> > GroupV3d0<K, V> ()
+        public GraphTraversal< S , E > GroupV3d0 (string sideEffectKey)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { sideEffectKey };
             Bytecode.AddStep("groupV3d0", args);
-            return Wrap< S , IDictionary<K, V> >(this);
+            return Wrap< S , E >(this);
         }
 
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Has (string propertyKey, ITraversal 
propertyTraversal)
+        public GraphTraversal< S , E > Has (string label, string propertyKey, 
TraversalPredicate predicate)
         {
-            var args = new List<object> { propertyKey, propertyTraversal };
+            var args = new List<object> { label, propertyKey, predicate };
             Bytecode.AddStep("has", args);
             return Wrap< S , E >(this);
         }
@@ -695,9 +695,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Has (T accessor, ITraversal 
propertyTraversal)
+        public GraphTraversal< S , E > Has (string label, string propertyKey, 
object value)
         {
-            var args = new List<object> { accessor, propertyTraversal };
+            var args = new List<object> { label, propertyKey, value };
             Bytecode.AddStep("has", args);
             return Wrap< S , E >(this);
         }
@@ -705,9 +705,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Has (string label, string propertyKey, 
TraversalPredicate predicate)
+        public GraphTraversal< S , E > Has (string propertyKey, ITraversal 
propertyTraversal)
         {
-            var args = new List<object> { label, propertyKey, predicate };
+            var args = new List<object> { propertyKey, propertyTraversal };
             Bytecode.AddStep("has", args);
             return Wrap< S , E >(this);
         }
@@ -725,9 +725,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Has (T accessor, object value)
+        public GraphTraversal< S , E > Has (T accessor, ITraversal 
propertyTraversal)
         {
-            var args = new List<object> { accessor, value };
+            var args = new List<object> { accessor, propertyTraversal };
             Bytecode.AddStep("has", args);
             return Wrap< S , E >(this);
         }
@@ -735,9 +735,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Has (string label, string propertyKey, 
object value)
+        public GraphTraversal< S , E > Has (string propertyKey, 
TraversalPredicate predicate)
         {
-            var args = new List<object> { label, propertyKey, value };
+            var args = new List<object> { propertyKey, predicate };
             Bytecode.AddStep("has", args);
             return Wrap< S , E >(this);
         }
@@ -745,9 +745,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Has (string propertyKey, object value)
+        public GraphTraversal< S , E > Has (T accessor, TraversalPredicate 
predicate)
         {
-            var args = new List<object> { propertyKey, value };
+            var args = new List<object> { accessor, predicate };
             Bytecode.AddStep("has", args);
             return Wrap< S , E >(this);
         }
@@ -755,9 +755,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Has (T accessor, TraversalPredicate 
predicate)
+        public GraphTraversal< S , E > Has (string propertyKey, object value)
         {
-            var args = new List<object> { accessor, predicate };
+            var args = new List<object> { propertyKey, value };
             Bytecode.AddStep("has", args);
             return Wrap< S , E >(this);
         }
@@ -765,9 +765,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the has step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Has (string propertyKey, 
TraversalPredicate predicate)
+        public GraphTraversal< S , E > Has (T accessor, object value)
         {
-            var args = new List<object> { propertyKey, predicate };
+            var args = new List<object> { accessor, value };
             Bytecode.AddStep("has", args);
             return Wrap< S , E >(this);
         }
@@ -815,9 +815,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the hasLabel step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > HasLabel (string label, params string[] 
otherLabels)
+        public GraphTraversal< S , E > HasLabel (TraversalPredicate predicate)
         {
-            var args = new List<object> { label, otherLabels };
+            var args = new List<object> { predicate };
             Bytecode.AddStep("hasLabel", args);
             return Wrap< S , E >(this);
         }
@@ -825,9 +825,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the hasLabel step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > HasLabel (TraversalPredicate predicate)
+        public GraphTraversal< S , E > HasLabel (string label, params string[] 
otherLabels)
         {
-            var args = new List<object> { predicate };
+            var args = new List<object> { label, otherLabels };
             Bytecode.AddStep("hasLabel", args);
             return Wrap< S , E >(this);
         }
@@ -965,21 +965,21 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the limit step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Limit (long limit)
+        public GraphTraversal< S , E2 > Limit<E2> (Scope scope, long limit)
         {
-            var args = new List<object> { limit };
+            var args = new List<object> { scope, limit };
             Bytecode.AddStep("limit", args);
-            return Wrap< S , E >(this);
+            return Wrap< S , E2 >(this);
         }
 
         /// <summary>
         ///     Adds the limit step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Limit<E2> (Scope scope, long limit)
+        public GraphTraversal< S , E > Limit (long limit)
         {
-            var args = new List<object> { scope, limit };
+            var args = new List<object> { limit };
             Bytecode.AddStep("limit", args);
-            return Wrap< S , E2 >(this);
+            return Wrap< S , E >(this);
         }
 
         /// <summary>
@@ -1005,9 +1005,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the map step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Map<E2> (ITraversal mapTraversal)
+        public GraphTraversal< S , E2 > Map<E2> (object function)
         {
-            var args = new List<object> { mapTraversal };
+            var args = new List<object> { function };
             Bytecode.AddStep("map", args);
             return Wrap< S , E2 >(this);
         }
@@ -1015,9 +1015,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the map step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Map<E2> (object function)
+        public GraphTraversal< S , E2 > Map<E2> (ITraversal mapTraversal)
         {
-            var args = new List<object> { function };
+            var args = new List<object> { mapTraversal };
             Bytecode.AddStep("map", args);
             return Wrap< S , E2 >(this);
         }
@@ -1055,9 +1055,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the max step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Max<E2> (Scope scope)
+        public GraphTraversal< S , E2 > Max<E2> ()
         {
-            var args = new List<object> { scope };
+            var args = new List<object> {  };
             Bytecode.AddStep("max", args);
             return Wrap< S , E2 >(this);
         }
@@ -1065,9 +1065,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the max step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Max<E2> ()
+        public GraphTraversal< S , E2 > Max<E2> (Scope scope)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { scope };
             Bytecode.AddStep("max", args);
             return Wrap< S , E2 >(this);
         }
@@ -1125,9 +1125,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the option step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Option (object pickToken, ITraversal 
traversalOption)
+        public GraphTraversal< S , E > Option (ITraversal traversalOption)
         {
-            var args = new List<object> { pickToken, traversalOption };
+            var args = new List<object> { traversalOption };
             Bytecode.AddStep("option", args);
             return Wrap< S , E >(this);
         }
@@ -1135,9 +1135,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the option step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Option (ITraversal traversalOption)
+        public GraphTraversal< S , E > Option (object pickToken, ITraversal 
traversalOption)
         {
-            var args = new List<object> { traversalOption };
+            var args = new List<object> { pickToken, traversalOption };
             Bytecode.AddStep("option", args);
             return Wrap< S , E >(this);
         }
@@ -1225,9 +1225,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the pageRank step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > PageRank (double alpha)
+        public GraphTraversal< S , E > PageRank ()
         {
-            var args = new List<object> { alpha };
+            var args = new List<object> {  };
             Bytecode.AddStep("pageRank", args);
             return Wrap< S , E >(this);
         }
@@ -1235,9 +1235,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the pageRank step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > PageRank ()
+        public GraphTraversal< S , E > PageRank (double alpha)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { alpha };
             Bytecode.AddStep("pageRank", args);
             return Wrap< S , E >(this);
         }
@@ -1265,21 +1265,21 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the profile step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Profile<E2> ()
+        public GraphTraversal< S , E > Profile (string sideEffectKey)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { sideEffectKey };
             Bytecode.AddStep("profile", args);
-            return Wrap< S , E2 >(this);
+            return Wrap< S , E >(this);
         }
 
         /// <summary>
         ///     Adds the profile step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Profile (string sideEffectKey)
+        public GraphTraversal< S , E2 > Profile<E2> ()
         {
-            var args = new List<object> { sideEffectKey };
+            var args = new List<object> {  };
             Bytecode.AddStep("profile", args);
-            return Wrap< S , E >(this);
+            return Wrap< S , E2 >(this);
         }
 
         /// <summary>
@@ -1315,9 +1315,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the property step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Property (object key, object value, 
params object[] keyValues)
+        public GraphTraversal< S , E > Property (Cardinality cardinality, 
object key, object value, params object[] keyValues)
         {
-            var args = new List<object> { key, value, keyValues };
+            var args = new List<object> { cardinality, key, value, keyValues };
             Bytecode.AddStep("property", args);
             return Wrap< S , E >(this);
         }
@@ -1325,9 +1325,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the property step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Property (Cardinality cardinality, 
object key, object value, params object[] keyValues)
+        public GraphTraversal< S , E > Property (object key, object value, 
params object[] keyValues)
         {
-            var args = new List<object> { cardinality, key, value, keyValues };
+            var args = new List<object> { key, value, keyValues };
             Bytecode.AddStep("property", args);
             return Wrap< S , E >(this);
         }
@@ -1345,21 +1345,21 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the range step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Range<E2> (Scope scope, long low, long 
high)
+        public GraphTraversal< S , E > Range (long low, long high)
         {
-            var args = new List<object> { scope, low, high };
+            var args = new List<object> { low, high };
             Bytecode.AddStep("range", args);
-            return Wrap< S , E2 >(this);
+            return Wrap< S , E >(this);
         }
 
         /// <summary>
         ///     Adds the range step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Range (long low, long high)
+        public GraphTraversal< S , E2 > Range<E2> (Scope scope, long low, long 
high)
         {
-            var args = new List<object> { low, high };
+            var args = new List<object> { scope, low, high };
             Bytecode.AddStep("range", args);
-            return Wrap< S , E >(this);
+            return Wrap< S , E2 >(this);
         }
 
         /// <summary>
@@ -1375,19 +1375,19 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the sack step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Sack<E2> ()
+        public GraphTraversal< S , E > Sack (object sackOperator)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { sackOperator };
             Bytecode.AddStep("sack", args);
-            return Wrap< S , E2 >(this);
+            return Wrap< S , E >(this);
         }
 
         /// <summary>
         ///     Adds the sack step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Sack (object sackOperator)
+        public GraphTraversal< S , E > Sack (object sackOperator, string 
elementPropertyKey)
         {
-            var args = new List<object> { sackOperator };
+            var args = new List<object> { sackOperator, elementPropertyKey };
             Bytecode.AddStep("sack", args);
             return Wrap< S , E >(this);
         }
@@ -1395,19 +1395,19 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the sack step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Sack (object sackOperator, string 
elementPropertyKey)
+        public GraphTraversal< S , E2 > Sack<E2> ()
         {
-            var args = new List<object> { sackOperator, elementPropertyKey };
+            var args = new List<object> {  };
             Bytecode.AddStep("sack", args);
-            return Wrap< S , E >(this);
+            return Wrap< S , E2 >(this);
         }
 
         /// <summary>
         ///     Adds the sample step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Sample (int amountToSample)
+        public GraphTraversal< S , E > Sample (Scope scope, int amountToSample)
         {
-            var args = new List<object> { amountToSample };
+            var args = new List<object> { scope, amountToSample };
             Bytecode.AddStep("sample", args);
             return Wrap< S , E >(this);
         }
@@ -1415,9 +1415,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the sample step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Sample (Scope scope, int amountToSample)
+        public GraphTraversal< S , E > Sample (int amountToSample)
         {
-            var args = new List<object> { scope, amountToSample };
+            var args = new List<object> { amountToSample };
             Bytecode.AddStep("sample", args);
             return Wrap< S , E >(this);
         }
@@ -1425,19 +1425,19 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the select step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , ICollection<E2> > Select<E2> (Column column)
+        public GraphTraversal< S , IDictionary<string, E2> > Select<E2> (Pop 
pop, string selectKey1, string selectKey2, params string[] otherSelectKeys)
         {
-            var args = new List<object> { column };
+            var args = new List<object> { pop, selectKey1, selectKey2, 
otherSelectKeys };
             Bytecode.AddStep("select", args);
-            return Wrap< S , ICollection<E2> >(this);
+            return Wrap< S , IDictionary<string, E2> >(this);
         }
 
         /// <summary>
         ///     Adds the select step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Select<E2> (string selectKey)
+        public GraphTraversal< S , E2 > Select<E2> (Pop pop, string selectKey)
         {
-            var args = new List<object> { selectKey };
+            var args = new List<object> { pop, selectKey };
             Bytecode.AddStep("select", args);
             return Wrap< S , E2 >(this);
         }
@@ -1445,9 +1445,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the select step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Select<E2> (Pop pop, string selectKey)
+        public GraphTraversal< S , E2 > Select<E2> (string selectKey)
         {
-            var args = new List<object> { pop, selectKey };
+            var args = new List<object> { selectKey };
             Bytecode.AddStep("select", args);
             return Wrap< S , E2 >(this);
         }
@@ -1455,11 +1455,11 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the select step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , IDictionary<string, E2> > Select<E2> (Pop 
pop, string selectKey1, string selectKey2, params string[] otherSelectKeys)
+        public GraphTraversal< S , ICollection<E2> > Select<E2> (Column column)
         {
-            var args = new List<object> { pop, selectKey1, selectKey2, 
otherSelectKeys };
+            var args = new List<object> { column };
             Bytecode.AddStep("select", args);
-            return Wrap< S , IDictionary<string, E2> >(this);
+            return Wrap< S , ICollection<E2> >(this);
         }
 
         /// <summary>
@@ -1475,9 +1475,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the sideEffect step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > SideEffect (ITraversal 
sideEffectTraversal)
+        public GraphTraversal< S , E > SideEffect (object consumer)
         {
-            var args = new List<object> { sideEffectTraversal };
+            var args = new List<object> { consumer };
             Bytecode.AddStep("sideEffect", args);
             return Wrap< S , E >(this);
         }
@@ -1485,9 +1485,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the sideEffect step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > SideEffect (object consumer)
+        public GraphTraversal< S , E > SideEffect (ITraversal 
sideEffectTraversal)
         {
-            var args = new List<object> { consumer };
+            var args = new List<object> { sideEffectTraversal };
             Bytecode.AddStep("sideEffect", args);
             return Wrap< S , E >(this);
         }
@@ -1525,9 +1525,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the sum step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Sum<E2> ()
+        public GraphTraversal< S , E2 > Sum<E2> (Scope scope)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { scope };
             Bytecode.AddStep("sum", args);
             return Wrap< S , E2 >(this);
         }
@@ -1535,9 +1535,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the sum step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Sum<E2> (Scope scope)
+        public GraphTraversal< S , E2 > Sum<E2> ()
         {
-            var args = new List<object> { scope };
+            var args = new List<object> {  };
             Bytecode.AddStep("sum", args);
             return Wrap< S , E2 >(this);
         }
@@ -1545,21 +1545,21 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the tail step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Tail<E2> (Scope scope, long limit)
+        public GraphTraversal< S , E > Tail ()
         {
-            var args = new List<object> { scope, limit };
+            var args = new List<object> {  };
             Bytecode.AddStep("tail", args);
-            return Wrap< S , E2 >(this);
+            return Wrap< S , E >(this);
         }
 
         /// <summary>
         ///     Adds the tail step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Tail ()
+        public GraphTraversal< S , E2 > Tail<E2> (Scope scope)
         {
-            var args = new List<object> {  };
+            var args = new List<object> { scope };
             Bytecode.AddStep("tail", args);
-            return Wrap< S , E >(this);
+            return Wrap< S , E2 >(this);
         }
 
         /// <summary>
@@ -1575,9 +1575,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the tail step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E2 > Tail<E2> (Scope scope)
+        public GraphTraversal< S , E2 > Tail<E2> (Scope scope, long limit)
         {
-            var args = new List<object> { scope };
+            var args = new List<object> { scope, limit };
             Bytecode.AddStep("tail", args);
             return Wrap< S , E2 >(this);
         }
@@ -1605,11 +1605,11 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the to step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > To (ITraversal toVertex)
+        public GraphTraversal< S , Vertex > To (Direction direction, params 
string[] edgeLabels)
         {
-            var args = new List<object> { toVertex };
+            var args = new List<object> { direction, edgeLabels };
             Bytecode.AddStep("to", args);
-            return Wrap< S , E >(this);
+            return Wrap< S , Vertex >(this);
         }
 
         /// <summary>
@@ -1625,11 +1625,11 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the to step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , Vertex > To (Direction direction, params 
string[] edgeLabels)
+        public GraphTraversal< S , E > To (ITraversal toVertex)
         {
-            var args = new List<object> { direction, edgeLabels };
+            var args = new List<object> { toVertex };
             Bytecode.AddStep("to", args);
-            return Wrap< S , Vertex >(this);
+            return Wrap< S , E >(this);
         }
 
         /// <summary>
@@ -1725,9 +1725,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the valueMap step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , IDictionary<string, E2> > ValueMap<E2> 
(params string[] propertyKeys)
+        public GraphTraversal< S , IDictionary<string, E2> > ValueMap<E2> 
(bool includeTokens, params string[] propertyKeys)
         {
-            var args = new List<object> { propertyKeys };
+            var args = new List<object> { includeTokens, propertyKeys };
             Bytecode.AddStep("valueMap", args);
             return Wrap< S , IDictionary<string, E2> >(this);
         }
@@ -1735,9 +1735,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the valueMap step to this <see 
cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal< S , IDictionary<string, E2> > ValueMap<E2> 
(bool includeTokens, params string[] propertyKeys)
+        public GraphTraversal< S , IDictionary<string, E2> > ValueMap<E2> 
(params string[] propertyKeys)
         {
-            var args = new List<object> { includeTokens, propertyKeys };
+            var args = new List<object> { propertyKeys };
             Bytecode.AddStep("valueMap", args);
             return Wrap< S , IDictionary<string, E2> >(this);
         }
@@ -1765,9 +1765,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the where step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Where (string startKey, 
TraversalPredicate predicate)
+        public GraphTraversal< S , E > Where (ITraversal whereTraversal)
         {
-            var args = new List<object> { startKey, predicate };
+            var args = new List<object> { whereTraversal };
             Bytecode.AddStep("where", args);
             return Wrap< S , E >(this);
         }
@@ -1775,9 +1775,9 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the where step to this <see cref="GraphTraversal{SType, 
EType}" />.
         /// </summary>
-        public GraphTraversal< S , E > Where (ITraversal whereTraversal)
+        public GraphTraversal< S , E > Where (string startKey, 
TraversalPredicate predicate)
         {
-            var args = new List<object> { whereTraversal };
+            var args = new List<object> { startKey, predicate };
             Bytecode.AddStep("where", args);
             return Wrap< S , E >(this);
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5a5b5b67/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
----------------------------------------------------------------------
diff --git 
a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs 
b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
index 5770c47..7dc602d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
@@ -99,38 +99,38 @@ namespace Gremlin.Net.Process.Traversal
             return source;
         }
 
-        public GraphTraversalSource WithSack(object initialValue, object 
splitOperator, object mergeOperator)
+        public GraphTraversalSource WithSack(object initialValue, object 
splitOperator)
         {
             var source = new GraphTraversalSource(new 
List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
-            var args = new List<object> { initialValue, splitOperator, 
mergeOperator };
+            var args = new List<object> { initialValue, splitOperator };
             source.Bytecode.AddSource("withSack", args);
             return source;
         }
 
-        public GraphTraversalSource WithSack(object initialValue)
+        public GraphTraversalSource WithSack(object initialValue, object 
splitOperator)
         {
             var source = new GraphTraversalSource(new 
List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
-            var args = new List<object> { initialValue };
+            var args = new List<object> { initialValue, splitOperator };
             source.Bytecode.AddSource("withSack", args);
             return source;
         }
 
-        public GraphTraversalSource WithSack(object initialValue)
+        public GraphTraversalSource WithSack(object initialValue, object 
splitOperator, object mergeOperator)
         {
             var source = new GraphTraversalSource(new 
List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
-            var args = new List<object> { initialValue };
+            var args = new List<object> { initialValue, splitOperator, 
mergeOperator };
             source.Bytecode.AddSource("withSack", args);
             return source;
         }
 
-        public GraphTraversalSource WithSack(object initialValue, object 
splitOperator)
+        public GraphTraversalSource WithSack(object initialValue)
         {
             var source = new GraphTraversalSource(new 
List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
-            var args = new List<object> { initialValue, splitOperator };
+            var args = new List<object> { initialValue };
             source.Bytecode.AddSource("withSack", args);
             return source;
         }
@@ -144,56 +144,56 @@ namespace Gremlin.Net.Process.Traversal
             return source;
         }
 
-        public GraphTraversalSource WithSack(object initialValue, object 
mergeOperator)
+        public GraphTraversalSource WithSack(object initialValue)
         {
             var source = new GraphTraversalSource(new 
List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
-            var args = new List<object> { initialValue, mergeOperator };
+            var args = new List<object> { initialValue };
             source.Bytecode.AddSource("withSack", args);
             return source;
         }
 
-        public GraphTraversalSource WithSack(object initialValue, object 
splitOperator)
+        public GraphTraversalSource WithSack(object initialValue, object 
mergeOperator)
         {
             var source = new GraphTraversalSource(new 
List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
-            var args = new List<object> { initialValue, splitOperator };
+            var args = new List<object> { initialValue, mergeOperator };
             source.Bytecode.AddSource("withSack", args);
             return source;
         }
 
-        public GraphTraversalSource WithSideEffect(string key, object 
initialValue)
+        public GraphTraversalSource WithSideEffect(string key, object 
initialValue, object reducer)
         {
             var source = new GraphTraversalSource(new 
List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
-            var args = new List<object> { key, initialValue };
+            var args = new List<object> { key, initialValue, reducer };
             source.Bytecode.AddSource("withSideEffect", args);
             return source;
         }
 
-        public GraphTraversalSource WithSideEffect(string key, object 
initialValue)
+        public GraphTraversalSource WithSideEffect(string key, object 
initialValue, object reducer)
         {
             var source = new GraphTraversalSource(new 
List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
-            var args = new List<object> { key, initialValue };
+            var args = new List<object> { key, initialValue, reducer };
             source.Bytecode.AddSource("withSideEffect", args);
             return source;
         }
 
-        public GraphTraversalSource WithSideEffect(string key, object 
initialValue, object reducer)
+        public GraphTraversalSource WithSideEffect(string key, object 
initialValue)
         {
             var source = new GraphTraversalSource(new 
List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
-            var args = new List<object> { key, initialValue, reducer };
+            var args = new List<object> { key, initialValue };
             source.Bytecode.AddSource("withSideEffect", args);
             return source;
         }
 
-        public GraphTraversalSource WithSideEffect(string key, object 
initialValue, object reducer)
+        public GraphTraversalSource WithSideEffect(string key, object 
initialValue)
         {
             var source = new GraphTraversalSource(new 
List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
-            var args = new List<object> { key, initialValue, reducer };
+            var args = new List<object> { key, initialValue };
             source.Bytecode.AddSource("withSideEffect", args);
             return source;
         }
@@ -279,10 +279,10 @@ namespace Gremlin.Net.Process.Traversal
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> off this 
graph traversal source and adds the addV step to that
         ///     traversal.
         /// </summary>
-        public GraphTraversal< Vertex,Vertex > AddV()
+        public GraphTraversal< Vertex,Vertex > AddV(params object[] keyValues)
         {
             var traversal = new GraphTraversal< Vertex,Vertex 
>(TraversalStrategies, new Bytecode(Bytecode));
-            var args = new List<object> {  };
+            var args = new List<object> { keyValues };
             traversal.Bytecode.AddStep("addV", args);
             return traversal;
         }
@@ -291,10 +291,10 @@ namespace Gremlin.Net.Process.Traversal
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> off this 
graph traversal source and adds the addV step to that
         ///     traversal.
         /// </summary>
-        public GraphTraversal< Vertex,Vertex > AddV(params object[] keyValues)
+        public GraphTraversal< Vertex,Vertex > AddV(string label)
         {
             var traversal = new GraphTraversal< Vertex,Vertex 
>(TraversalStrategies, new Bytecode(Bytecode));
-            var args = new List<object> { keyValues };
+            var args = new List<object> { label };
             traversal.Bytecode.AddStep("addV", args);
             return traversal;
         }
@@ -303,10 +303,10 @@ namespace Gremlin.Net.Process.Traversal
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> off this 
graph traversal source and adds the addV step to that
         ///     traversal.
         /// </summary>
-        public GraphTraversal< Vertex,Vertex > AddV(string label)
+        public GraphTraversal< Vertex,Vertex > AddV()
         {
             var traversal = new GraphTraversal< Vertex,Vertex 
>(TraversalStrategies, new Bytecode(Bytecode));
-            var args = new List<object> { label };
+            var args = new List<object> {  };
             traversal.Bytecode.AddStep("addV", args);
             return traversal;
         }

Reply via email to