You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by fl...@apache.org on 2018/03/13 20:31:26 UTC

[01/20] tinkerpop git commit: TINKERPOP-1901 Transformed Gremlin.Net enums into classes

Repository: tinkerpop
Updated Branches:
  refs/heads/master 6e0ccd836 -> 345d81a8f
  refs/heads/tp32 f02f94fd0 -> 504933975
  refs/heads/tp33 f9f3d4fc8 -> c22ab901e


TINKERPOP-1901 Transformed Gremlin.Net enums into classes


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

Branch: refs/heads/master
Commit: dcf3da3917a9626d432ef26089bb05c6a15158ed
Parents: ab66ed3
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sat Mar 10 19:17:15 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sat Mar 10 19:17:15 2018 +0100

----------------------------------------------------------------------
 docs/src/reference/gremlin-variants.asciidoc    |  2 +-
 gremlin-dotnet/glv/Enum.template                |  7 +-
 gremlin-dotnet/glv/generate.groovy              | 21 +----
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  9 +-
 .../Process/Traversal/Cardinality.cs            | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Column.cs | 11 ++-
 .../Gremlin.Net/Process/Traversal/Direction.cs  | 13 ++-
 .../Process/Traversal/EnumWrapper.cs            | 52 +++++++++++
 .../Process/Traversal/GraphSONVersion.cs        | 11 ++-
 .../Process/Traversal/GryoVersion.cs            |  9 +-
 .../Process/Traversal/NamingConversions.cs      | 91 --------------------
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 29 ++++---
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 21 +++--
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 15 ++--
 .../Structure/IO/GraphSON/EnumSerializer.cs     |  5 +-
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |  2 +-
 .../TraversalEnumParameter.cs                   |  5 +-
 20 files changed, 181 insertions(+), 170 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc
index f06fe02..ace8119 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -362,7 +362,7 @@ terminal/action methods off of `ITraversal`.
 
 === Static Enums and Methods
 
-Gremlin has various tokens (e.g. `T`, `P`, `Order`, `Operator`, etc.) that are represented in Gremlin.Net as Enums.
+Gremlin has various tokens (e.g. `T`, `P`, `Order`, `Operator`, etc.) that are represented in Gremlin.Net as classes.
 
 These can be used analogously to how they are used in Gremlin-Java.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/glv/Enum.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Enum.template b/gremlin-dotnet/glv/Enum.template
index 1fddab1..fd09312 100644
--- a/gremlin-dotnet/glv/Enum.template
+++ b/gremlin-dotnet/glv/Enum.template
@@ -26,8 +26,13 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum <%= enumClass.simpleName %>
+    public class <%= enumClass.simpleName %> : EnumWrapper
     {
+        private <%= enumClass.simpleName %>(string enumValue)
+            : base("<%= enumClass.simpleName %>", enumValue)
+        {            
+        }
+
         <%= constants %>
     }
     

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 12cfa88..7894793 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -339,36 +339,23 @@ def toCSharpName = { enumClass, itemName ->
     return itemName.substring(0, 1).toUpperCase() + itemName.substring(1)
 }
 
-def createEnum = { enumClass, csharpToJava ->
+def createEnum = { enumClass ->
     def b = ["enumClass": enumClass,
              "constants": enumClass.getEnumConstants().
                     sort { a, b -> a.name() <=> b.name() }.
                     collect { value ->
                         def csharpName = toCSharpName(enumClass, value.name())
-                        csharpToJava.put(enumClass.simpleName + "." + csharpName, value.name())
-                        return csharpName
-                    }.join(",\n\t\t")]
+                        return "public static ${enumClass.simpleName} ${csharpName} => new ${enumClass.simpleName}(\"${value.name()}\");"
+                    }.join("\n\t\t")]
 
     def enumTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/Enum.template")).make(b)
     def enumFile = new File("${projectBaseDir}/src/Gremlin.Net/Process/Traversal/" + enumClass.getSimpleName() + ".cs")
     enumFile.newWriter().withWriter{ it << enumTemplate }
 }
 
-def enumCSharpToJavaNames = [:]
 CoreImports.getClassImports().findAll { Enum.class.isAssignableFrom(it) }.
         sort { a, b -> a.getSimpleName() <=> b.getSimpleName() }.
-        each { createEnum(it, enumCSharpToJavaNames) }
-
-def lastIndex = (enumCSharpToJavaNames.size() - 1);
-def body = new StringBuilder()
-enumCSharpToJavaNames.eachWithIndex{ node, i ->
-    body.append("""{"$node.key", "$node.value"}""")
-    body.append(i == lastIndex ? "\n" : ",\n            ")
-}
-
-def namingConversionsTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/NamingConversions.template")).make(["body":body])
-def namingConversionsFile = new File("${projectBaseDir}/src/Gremlin.Net/Process/Traversal/NamingConversions.cs")
-namingConversionsFile.newWriter().withWriter{ it << namingConversionsTemplate }
+        each { createEnum(it) }
 
 def determineVersion = {
     def env = System.getenv()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
index 555d372..6c00f99 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
@@ -26,9 +26,14 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Barrier
+    public class Barrier : EnumWrapper
     {
-        NormSack
+        private Barrier(string enumValue)
+            : base("Barrier", enumValue)
+        {            
+        }
+
+        public static Barrier NormSack => new Barrier("normSack");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
index 5a07258..f158153 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
@@ -26,11 +26,16 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Cardinality
+    public class Cardinality : EnumWrapper
     {
-        List,
-		Set,
-		Single
+        private Cardinality(string enumValue)
+            : base("Cardinality", enumValue)
+        {            
+        }
+
+        public static Cardinality List => new Cardinality("list");
+		public static Cardinality Set => new Cardinality("set");
+		public static Cardinality Single => new Cardinality("single");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
index 432323f..3daaa4d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Column
+    public class Column : EnumWrapper
     {
-        Keys,
-		Values
+        private Column(string enumValue)
+            : base("Column", enumValue)
+        {            
+        }
+
+        public static Column Keys => new Column("keys");
+		public static Column Values => new Column("values");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
index 6f19748..9566d51 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
@@ -26,11 +26,16 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Direction
+    public class Direction : EnumWrapper
     {
-        Both,
-		In,
-		Out
+        private Direction(string enumValue)
+            : base("Direction", enumValue)
+        {            
+        }
+
+        public static Direction Both => new Direction("BOTH");
+		public static Direction In => new Direction("IN");
+		public static Direction Out => new Direction("OUT");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
new file mode 100644
index 0000000..66b8c5a
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
@@ -0,0 +1,52 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents an enum.
+    /// </summary>
+    public abstract class EnumWrapper
+    {
+        /// <summary>
+        ///     Gets the name of the enum.
+        /// </summary>
+        public string EnumName { get; }
+
+        /// <summary>
+        ///     Gets the value of the enum.
+        /// </summary>
+        public string EnumValue { get; }
+
+        /// <summary>
+        ///     Initializes a new instance of the <see cref="EnumWrapper" /> class.
+        /// </summary>
+        /// <param name="enumName">The name of the enum.</param>
+        /// <param name="enumValue">The value of the enum.</param>
+        protected EnumWrapper(string enumName, string enumValue)
+        {
+            EnumName = enumName;
+            EnumValue = enumValue;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
index e978bc6..ad73ad1 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum GraphSONVersion
+    public class GraphSONVersion : EnumWrapper
     {
-        V1_0,
-		V2_0
+        private GraphSONVersion(string enumValue)
+            : base("GraphSONVersion", enumValue)
+        {            
+        }
+
+        public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0");
+		public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
index 5ee7358..45387e2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
@@ -26,9 +26,14 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum GryoVersion
+    public class GryoVersion : EnumWrapper
     {
-        V1_0
+        private GryoVersion(string enumValue)
+            : base("GryoVersion", enumValue)
+        {            
+        }
+
+        public static GryoVersion V1_0 => new GryoVersion("V1_0");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
deleted file mode 100644
index aecdc57..0000000
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-#region License
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#endregion
-
-using System.Collections.Generic;
-
-// THIS IS A GENERATED FILE - DO NOT MODIFY THIS FILE DIRECTLY - see pom.xml
-namespace Gremlin.Net.Process.Traversal
-{
-    internal static class NamingConversions
-    {
-        /// <summary>
-        ///     Gets the Java name equivalent for a given enum value
-        /// </summary>
-        internal static string GetEnumJavaName(string typeName, string value)
-        {
-            var key = $"{typeName}.{value}";
-            string javaName;
-            if (!CSharpToJavaEnums.TryGetValue(key, out javaName))
-            {
-                throw new KeyNotFoundException($"Java name for {key} not found");
-            }
-            return javaName;
-        }
-
-        internal static readonly IDictionary<string, string> CSharpToJavaEnums = new Dictionary<string, string>
-        {
-            {"Barrier.NormSack", "normSack"},
-            {"Cardinality.List", "list"},
-            {"Cardinality.Set", "set"},
-            {"Cardinality.Single", "single"},
-            {"Column.Keys", "keys"},
-            {"Column.Values", "values"},
-            {"Direction.Both", "BOTH"},
-            {"Direction.In", "IN"},
-            {"Direction.Out", "OUT"},
-            {"GraphSONVersion.V1_0", "V1_0"},
-            {"GraphSONVersion.V2_0", "V2_0"},
-            {"GryoVersion.V1_0", "V1_0"},
-            {"Operator.AddAll", "addAll"},
-            {"Operator.And", "and"},
-            {"Operator.Assign", "assign"},
-            {"Operator.Div", "div"},
-            {"Operator.Max", "max"},
-            {"Operator.Min", "min"},
-            {"Operator.Minus", "minus"},
-            {"Operator.Mult", "mult"},
-            {"Operator.Or", "or"},
-            {"Operator.Sum", "sum"},
-            {"Operator.SumLong", "sumLong"},
-            {"Order.Decr", "decr"},
-            {"Order.Incr", "incr"},
-            {"Order.KeyDecr", "keyDecr"},
-            {"Order.KeyIncr", "keyIncr"},
-            {"Order.Shuffle", "shuffle"},
-            {"Order.ValueDecr", "valueDecr"},
-            {"Order.ValueIncr", "valueIncr"},
-            {"Pick.Any", "any"},
-            {"Pick.None", "none"},
-            {"Pop.All", "all"},
-            {"Pop.First", "first"},
-            {"Pop.Last", "last"},
-            {"Scope.Global", "global"},
-            {"Scope.Local", "local"},
-            {"T.Id", "id"},
-            {"T.Key", "key"},
-            {"T.Label", "label"},
-            {"T.Value", "value"}
-
-        };
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
index 72b0048..699a5a5 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
@@ -26,19 +26,24 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Operator
+    public class Operator : EnumWrapper
     {
-        AddAll,
-		And,
-		Assign,
-		Div,
-		Max,
-		Min,
-		Minus,
-		Mult,
-		Or,
-		Sum,
-		SumLong
+        private Operator(string enumValue)
+            : base("Operator", enumValue)
+        {            
+        }
+
+        public static Operator AddAll => new Operator("addAll");
+		public static Operator And => new Operator("and");
+		public static Operator Assign => new Operator("assign");
+		public static Operator Div => new Operator("div");
+		public static Operator Max => new Operator("max");
+		public static Operator Min => new Operator("min");
+		public static Operator Minus => new Operator("minus");
+		public static Operator Mult => new Operator("mult");
+		public static Operator Or => new Operator("or");
+		public static Operator Sum => new Operator("sum");
+		public static Operator SumLong => new Operator("sumLong");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index 1f12710..93bf7bc 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@ -26,15 +26,20 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Order
+    public class Order : EnumWrapper
     {
-        Decr,
-		Incr,
-		KeyDecr,
-		KeyIncr,
-		Shuffle,
-		ValueDecr,
-		ValueIncr
+        private Order(string enumValue)
+            : base("Order", enumValue)
+        {            
+        }
+
+        public static Order Decr => new Order("decr");
+		public static Order Incr => new Order("incr");
+		public static Order KeyDecr => new Order("keyDecr");
+		public static Order KeyIncr => new Order("keyIncr");
+		public static Order Shuffle => new Order("shuffle");
+		public static Order ValueDecr => new Order("valueDecr");
+		public static Order ValueIncr => new Order("valueIncr");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
index e6394ae..a47d4a6 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Pick
+    public class Pick : EnumWrapper
     {
-        Any,
-		None
+        private Pick(string enumValue)
+            : base("Pick", enumValue)
+        {            
+        }
+
+        public static Pick Any => new Pick("any");
+		public static Pick None => new Pick("none");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
index a7a8403..9e97a09 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
@@ -26,11 +26,16 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Pop
+    public class Pop : EnumWrapper
     {
-        All,
-		First,
-		Last
+        private Pop(string enumValue)
+            : base("Pop", enumValue)
+        {            
+        }
+
+        public static Pop All => new Pop("all");
+		public static Pop First => new Pop("first");
+		public static Pop Last => new Pop("last");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
index d5af93a..65a6e67 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Scope
+    public class Scope : EnumWrapper
     {
-        Global,
-		Local
+        private Scope(string enumValue)
+            : base("Scope", enumValue)
+        {            
+        }
+
+        public static Scope Global => new Scope("global");
+		public static Scope Local => new Scope("local");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
index c21b50a..9eba458 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
@@ -26,12 +26,17 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum T
+    public class T : EnumWrapper
     {
-        Id,
-		Key,
-		Label,
-		Value
+        private T(string enumValue)
+            : base("T", enumValue)
+        {            
+        }
+
+        public static T Id => new T("id");
+		public static T Key => new T("key");
+		public static T Label => new T("label");
+		public static T Value => new T("value");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
index b4ab870..ccea7cd 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
@@ -30,9 +30,8 @@ namespace Gremlin.Net.Structure.IO.GraphSON
     {
         public Dictionary<string, dynamic> Dictify(dynamic objectData, GraphSONWriter writer)
         {
-            var enumName = objectData.GetType().Name;
-            var valueJavaName = NamingConversions.GetEnumJavaName(enumName, objectData.ToString());
-            return GraphSONUtil.ToTypedValue(enumName, valueJavaName);
+            EnumWrapper enumToSerialize = objectData;
+            return GraphSONUtil.ToTypedValue(enumToSerialize.EnumName, enumToSerialize.EnumValue);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
index a60a558..d5b7acc 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
@@ -53,7 +53,7 @@ namespace Gremlin.Net.Structure.IO.GraphSON
                 {typeof(Guid), new UuidSerializer()},
                 {typeof(DateTimeOffset), new DateSerializer()},
                 {typeof(Type), new ClassSerializer()},
-                {typeof(Enum), new EnumSerializer()},
+                {typeof(EnumWrapper), new EnumSerializer()},
                 {typeof(TraversalPredicate), new TraversalPredicateSerializer()},
                 {typeof(Vertex), new VertexSerializer()},
                 {typeof(Edge), new EdgeSerializer()},

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
index c305df7..9457cae 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
@@ -26,7 +26,6 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
 using Gremlin.Net.Process.Traversal;
-using TEnum = Gremlin.Net.Process.Traversal.T;
 
 namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
 {
@@ -38,7 +37,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
         private readonly string _text;
 
         private static readonly IDictionary<string, Type> EnumTypesByName = typeof(Scope).GetTypeInfo().Assembly
-            .GetTypes().Where(t => t.GetTypeInfo().IsEnum && t.GetTypeInfo().IsPublic)
+            .GetTypes().Where(t => t.GetTypeInfo().IsSubclassOf(typeof(EnumWrapper)) && t.GetTypeInfo().IsPublic)
             .ToDictionary(e => e.Name, e => e);
         
         private readonly object _value;
@@ -55,7 +54,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
             }
             _type = type;
             var valueName = text.Substring(separatorIndex + 1);
-            _value = Enum.Parse(type, GetCsharpName(valueName));
+            _value = _type.GetProperty(GetCsharpName(valueName)).GetValue(null);
         }
 
         private string GetCsharpName(string valueText)


[20/20] tinkerpop git commit: Merge branch 'tp33'

Posted by fl...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/master
Commit: 345d81a8faf65a24a634c89a524075d24c802550
Parents: 6e0ccd8 c22ab90
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 21:29:31 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 21:29:31 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/reference/gremlin-variants.asciidoc    |  2 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   | 11 +++++
 gremlin-dotnet/glv/Enum.template                |  9 +++-
 gremlin-dotnet/glv/generate.groovy              | 41 +++++++--------
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  9 +++-
 .../Process/Traversal/Cardinality.cs            | 13 +++--
 .../src/Gremlin.Net/Process/Traversal/Column.cs | 11 +++--
 .../Gremlin.Net/Process/Traversal/Direction.cs  | 13 +++--
 .../Process/Traversal/EnumWrapper.cs            | 52 ++++++++++++++++++++
 .../Process/Traversal/GraphSONVersion.cs        | 13 +++--
 .../Process/Traversal/GraphTraversal.cs         | 43 +++++++++-------
 .../Process/Traversal/GraphTraversalSource.cs   | 14 ++++--
 .../Process/Traversal/GryoVersion.cs            | 11 +++--
 .../Process/Traversal/IBiFunction.cs            | 33 +++++++++++++
 .../Process/Traversal/IBinaryOperator.cs        | 34 +++++++++++++
 .../Process/Traversal/IComparator.cs            | 32 ++++++++++++
 .../Gremlin.Net/Process/Traversal/IConsumer.cs  | 33 +++++++++++++
 .../Gremlin.Net/Process/Traversal/IFunction.cs  | 32 ++++++++++++
 .../Gremlin.Net/Process/Traversal/IPredicate.cs | 32 ++++++++++++
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 29 ++++++-----
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 13 +++--
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   | 11 +++--
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    | 15 ++++--
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  | 11 +++--
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 15 ++++--
 .../Process/Traversal/TraversalPredicate.cs     |  2 +-
 .../src/Gremlin.Net/Process/Traversal/__.cs     | 26 +++++-----
 .../Structure/IO/GraphSON/EnumSerializer.cs     |  5 +-
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |  2 +-
 .../Gherkin/GherkinTestRunner.cs                |  1 +
 .../TraversalEnumParameter.cs                   |  5 +-
 32 files changed, 455 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/345d81a8/CHANGELOG.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/345d81a8/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------


[13/20] tinkerpop git commit: Merge branch 'TINKERPOP-1901' into tp32

Posted by fl...@apache.org.
Merge branch 'TINKERPOP-1901' into tp32


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

Branch: refs/heads/tp32
Commit: 504933975d2fbbeb61aa724f38aa8b7c888f63ea
Parents: f02f94f df989dc
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 19:27:58 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 19:27:58 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/reference/gremlin-variants.asciidoc    |  2 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   | 11 +++
 gremlin-dotnet/glv/Enum.template                |  9 +-
 gremlin-dotnet/glv/generate.groovy              | 41 ++++-----
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  9 +-
 .../Process/Traversal/Cardinality.cs            | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Column.cs | 11 ++-
 .../Gremlin.Net/Process/Traversal/Direction.cs  | 13 ++-
 .../Process/Traversal/EnumWrapper.cs            | 52 +++++++++++
 .../Process/Traversal/GraphSONVersion.cs        | 11 ++-
 .../Process/Traversal/GraphTraversal.cs         | 45 ++++++----
 .../Process/Traversal/GraphTraversalSource.cs   | 14 ++-
 .../Process/Traversal/GryoVersion.cs            |  9 +-
 .../Process/Traversal/IBiFunction.cs            | 33 +++++++
 .../Process/Traversal/IBinaryOperator.cs        | 34 ++++++++
 .../Process/Traversal/IComparator.cs            | 32 +++++++
 .../Gremlin.Net/Process/Traversal/IConsumer.cs  | 33 +++++++
 .../Gremlin.Net/Process/Traversal/IFunction.cs  | 32 +++++++
 .../Gremlin.Net/Process/Traversal/IPredicate.cs | 32 +++++++
 .../Process/Traversal/NamingConversions.cs      | 91 --------------------
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 29 ++++---
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 21 +++--
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 15 ++--
 .../Process/Traversal/TraversalPredicate.cs     |  2 +-
 .../src/Gremlin.Net/Process/Traversal/__.cs     | 28 +++---
 .../Structure/IO/GraphSON/EnumSerializer.cs     |  5 +-
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |  2 +-
 .../TraversalEnumParameter.cs                   |  5 +-
 32 files changed, 457 insertions(+), 213 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/50493397/CHANGELOG.asciidoc
----------------------------------------------------------------------


[07/20] tinkerpop git commit: TINKERPOP-1901 Use spaces to indent enum values

Posted by fl...@apache.org.
TINKERPOP-1901 Use spaces to indent enum values

Previously, the first enum value used spaces, whereas all following
values used tabs. Now, spaces are used consistently.


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

Branch: refs/heads/master
Commit: 4d5768b0aa53e06e95738f3faf904d3290a91794
Parents: d012171
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Mon Mar 12 16:37:30 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Mon Mar 12 16:37:30 2018 +0100

----------------------------------------------------------------------
 gremlin-dotnet/glv/Enum.template                |  4 ++--
 gremlin-dotnet/glv/generate.groovy              |  2 +-
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  2 +-
 .../Process/Traversal/Cardinality.cs            |  8 +++----
 .../src/Gremlin.Net/Process/Traversal/Column.cs |  6 ++---
 .../Gremlin.Net/Process/Traversal/Direction.cs  |  8 +++----
 .../Process/Traversal/GraphSONVersion.cs        |  6 ++---
 .../Process/Traversal/GryoVersion.cs            |  2 +-
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 24 ++++++++++----------
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 16 ++++++-------
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   |  6 ++---
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    |  8 +++----
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  |  6 ++---
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 10 ++++----
 14 files changed, 54 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/glv/Enum.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Enum.template b/gremlin-dotnet/glv/Enum.template
index 0be23c7..1f11076 100644
--- a/gremlin-dotnet/glv/Enum.template
+++ b/gremlin-dotnet/glv/Enum.template
@@ -32,8 +32,8 @@ namespace Gremlin.Net.Process.Traversal
             : base("<%= enumClass.simpleName %>", enumValue)
         {            
         }
-
-        <%= constants %>
+<% constants.each { constant -> %> 
+        <%= constant %><%}%>
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 6d89b2f..0404307 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -354,7 +354,7 @@ def createEnum = { enumClass ->
                     collect { value ->
                         def csharpName = toCSharpName(enumClass, value.name())
                         return "public static ${enumClass.simpleName} ${csharpName} => new ${enumClass.simpleName}(\"${value.name()}\");"
-                    }.join("\n\t\t")]
+                    }]
 
     def enumTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/Enum.template")).make(b)
     def enumFile = new File("${projectBaseDir}/src/Gremlin.Net/Process/Traversal/" + enumClass.getSimpleName() + ".cs")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
index 0ae4fa2..df6d349 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
@@ -32,7 +32,7 @@ namespace Gremlin.Net.Process.Traversal
             : base("Barrier", enumValue)
         {            
         }
-
+ 
         public static Barrier NormSack => new Barrier("normSack");
     }
     

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
index f158153..d2cbcf2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
@@ -32,10 +32,10 @@ namespace Gremlin.Net.Process.Traversal
             : base("Cardinality", enumValue)
         {            
         }
-
-        public static Cardinality List => new Cardinality("list");
-		public static Cardinality Set => new Cardinality("set");
-		public static Cardinality Single => new Cardinality("single");
+ 
+        public static Cardinality List => new Cardinality("list"); 
+        public static Cardinality Set => new Cardinality("set"); 
+        public static Cardinality Single => new Cardinality("single");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
index 9fa2039..9e0451e 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("Column", enumValue)
         {            
         }
-
-        public static Column Keys => new Column("keys");
-		public static Column Values => new Column("values");
+ 
+        public static Column Keys => new Column("keys"); 
+        public static Column Values => new Column("values");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
index 9566d51..5a93f0a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
@@ -32,10 +32,10 @@ namespace Gremlin.Net.Process.Traversal
             : base("Direction", enumValue)
         {            
         }
-
-        public static Direction Both => new Direction("BOTH");
-		public static Direction In => new Direction("IN");
-		public static Direction Out => new Direction("OUT");
+ 
+        public static Direction Both => new Direction("BOTH"); 
+        public static Direction In => new Direction("IN"); 
+        public static Direction Out => new Direction("OUT");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
index ad73ad1..0c92607 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("GraphSONVersion", enumValue)
         {            
         }
-
-        public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0");
-		public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
+ 
+        public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0"); 
+        public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
index 45387e2..fcc746e 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
@@ -32,7 +32,7 @@ namespace Gremlin.Net.Process.Traversal
             : base("GryoVersion", enumValue)
         {            
         }
-
+ 
         public static GryoVersion V1_0 => new GryoVersion("V1_0");
     }
     

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
index 4116197..8f0c9b3 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
@@ -32,18 +32,18 @@ namespace Gremlin.Net.Process.Traversal
             : base("Operator", enumValue)
         {            
         }
-
-        public static Operator AddAll => new Operator("addAll");
-		public static Operator And => new Operator("and");
-		public static Operator Assign => new Operator("assign");
-		public static Operator Div => new Operator("div");
-		public static Operator Max => new Operator("max");
-		public static Operator Min => new Operator("min");
-		public static Operator Minus => new Operator("minus");
-		public static Operator Mult => new Operator("mult");
-		public static Operator Or => new Operator("or");
-		public static Operator Sum => new Operator("sum");
-		public static Operator SumLong => new Operator("sumLong");
+ 
+        public static Operator AddAll => new Operator("addAll"); 
+        public static Operator And => new Operator("and"); 
+        public static Operator Assign => new Operator("assign"); 
+        public static Operator Div => new Operator("div"); 
+        public static Operator Max => new Operator("max"); 
+        public static Operator Min => new Operator("min"); 
+        public static Operator Minus => new Operator("minus"); 
+        public static Operator Mult => new Operator("mult"); 
+        public static Operator Or => new Operator("or"); 
+        public static Operator Sum => new Operator("sum"); 
+        public static Operator SumLong => new Operator("sumLong");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index d20906a..44ccb9b 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@ -32,14 +32,14 @@ namespace Gremlin.Net.Process.Traversal
             : base("Order", enumValue)
         {            
         }
-
-        public static Order Decr => new Order("decr");
-		public static Order Incr => new Order("incr");
-		public static Order KeyDecr => new Order("keyDecr");
-		public static Order KeyIncr => new Order("keyIncr");
-		public static Order Shuffle => new Order("shuffle");
-		public static Order ValueDecr => new Order("valueDecr");
-		public static Order ValueIncr => new Order("valueIncr");
+ 
+        public static Order Decr => new Order("decr"); 
+        public static Order Incr => new Order("incr"); 
+        public static Order KeyDecr => new Order("keyDecr"); 
+        public static Order KeyIncr => new Order("keyIncr"); 
+        public static Order Shuffle => new Order("shuffle"); 
+        public static Order ValueDecr => new Order("valueDecr"); 
+        public static Order ValueIncr => new Order("valueIncr");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
index a47d4a6..d4132ea 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("Pick", enumValue)
         {            
         }
-
-        public static Pick Any => new Pick("any");
-		public static Pick None => new Pick("none");
+ 
+        public static Pick Any => new Pick("any"); 
+        public static Pick None => new Pick("none");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
index 9e97a09..8a157c5 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
@@ -32,10 +32,10 @@ namespace Gremlin.Net.Process.Traversal
             : base("Pop", enumValue)
         {            
         }
-
-        public static Pop All => new Pop("all");
-		public static Pop First => new Pop("first");
-		public static Pop Last => new Pop("last");
+ 
+        public static Pop All => new Pop("all"); 
+        public static Pop First => new Pop("first"); 
+        public static Pop Last => new Pop("last");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
index 65a6e67..ee67c39 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("Scope", enumValue)
         {            
         }
-
-        public static Scope Global => new Scope("global");
-		public static Scope Local => new Scope("local");
+ 
+        public static Scope Global => new Scope("global"); 
+        public static Scope Local => new Scope("local");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
index c0e5927..bae1314 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
@@ -32,11 +32,11 @@ namespace Gremlin.Net.Process.Traversal
             : base("T", enumValue)
         {            
         }
-
-        public static T Id => new T("id");
-		public static T Key => new T("key");
-		public static T Label => new T("label");
-		public static T Value => new T("value");
+ 
+        public static T Id => new T("id"); 
+        public static T Key => new T("key"); 
+        public static T Label => new T("label"); 
+        public static T Value => new T("value");
     }
     
 #pragma warning restore 1591


[19/20] tinkerpop git commit: Ignore one more test due to T deserialization problem CTR

Posted by fl...@apache.org.
Ignore one more test due to T deserialization problem CTR


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

Branch: refs/heads/tp33
Commit: c22ab901ea391116cf906b7af37379429a1336af
Parents: 8cf71ae
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 21:27:51 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 21:27:51 2018 +0100

----------------------------------------------------------------------
 .../test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs   | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c22ab901/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index bc82043..28723c9 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -42,6 +42,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             {
                 { "g_V_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported },   // TINKERPOP-1866
                 { "g_V_valueMapXtrue_name_ageX", IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866
+                { "g_V_hasLabelXpersonX_filterXoutEXcreatedXX_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866
                 {"g_V_hasIdXwithinXemptyXX_count", IgnoreReason.PWithinWrapsArgumentsInArray},
                 {"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray},
                 {


[02/20] tinkerpop git commit: TINKERPOP-1901 Transformed Gremlin.Net enums into classes

Posted by fl...@apache.org.
TINKERPOP-1901 Transformed Gremlin.Net enums into classes


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

Branch: refs/heads/tp32
Commit: dcf3da3917a9626d432ef26089bb05c6a15158ed
Parents: ab66ed3
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sat Mar 10 19:17:15 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sat Mar 10 19:17:15 2018 +0100

----------------------------------------------------------------------
 docs/src/reference/gremlin-variants.asciidoc    |  2 +-
 gremlin-dotnet/glv/Enum.template                |  7 +-
 gremlin-dotnet/glv/generate.groovy              | 21 +----
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  9 +-
 .../Process/Traversal/Cardinality.cs            | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Column.cs | 11 ++-
 .../Gremlin.Net/Process/Traversal/Direction.cs  | 13 ++-
 .../Process/Traversal/EnumWrapper.cs            | 52 +++++++++++
 .../Process/Traversal/GraphSONVersion.cs        | 11 ++-
 .../Process/Traversal/GryoVersion.cs            |  9 +-
 .../Process/Traversal/NamingConversions.cs      | 91 --------------------
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 29 ++++---
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 21 +++--
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 15 ++--
 .../Structure/IO/GraphSON/EnumSerializer.cs     |  5 +-
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |  2 +-
 .../TraversalEnumParameter.cs                   |  5 +-
 20 files changed, 181 insertions(+), 170 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc
index f06fe02..ace8119 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -362,7 +362,7 @@ terminal/action methods off of `ITraversal`.
 
 === Static Enums and Methods
 
-Gremlin has various tokens (e.g. `T`, `P`, `Order`, `Operator`, etc.) that are represented in Gremlin.Net as Enums.
+Gremlin has various tokens (e.g. `T`, `P`, `Order`, `Operator`, etc.) that are represented in Gremlin.Net as classes.
 
 These can be used analogously to how they are used in Gremlin-Java.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/glv/Enum.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Enum.template b/gremlin-dotnet/glv/Enum.template
index 1fddab1..fd09312 100644
--- a/gremlin-dotnet/glv/Enum.template
+++ b/gremlin-dotnet/glv/Enum.template
@@ -26,8 +26,13 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum <%= enumClass.simpleName %>
+    public class <%= enumClass.simpleName %> : EnumWrapper
     {
+        private <%= enumClass.simpleName %>(string enumValue)
+            : base("<%= enumClass.simpleName %>", enumValue)
+        {            
+        }
+
         <%= constants %>
     }
     

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 12cfa88..7894793 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -339,36 +339,23 @@ def toCSharpName = { enumClass, itemName ->
     return itemName.substring(0, 1).toUpperCase() + itemName.substring(1)
 }
 
-def createEnum = { enumClass, csharpToJava ->
+def createEnum = { enumClass ->
     def b = ["enumClass": enumClass,
              "constants": enumClass.getEnumConstants().
                     sort { a, b -> a.name() <=> b.name() }.
                     collect { value ->
                         def csharpName = toCSharpName(enumClass, value.name())
-                        csharpToJava.put(enumClass.simpleName + "." + csharpName, value.name())
-                        return csharpName
-                    }.join(",\n\t\t")]
+                        return "public static ${enumClass.simpleName} ${csharpName} => new ${enumClass.simpleName}(\"${value.name()}\");"
+                    }.join("\n\t\t")]
 
     def enumTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/Enum.template")).make(b)
     def enumFile = new File("${projectBaseDir}/src/Gremlin.Net/Process/Traversal/" + enumClass.getSimpleName() + ".cs")
     enumFile.newWriter().withWriter{ it << enumTemplate }
 }
 
-def enumCSharpToJavaNames = [:]
 CoreImports.getClassImports().findAll { Enum.class.isAssignableFrom(it) }.
         sort { a, b -> a.getSimpleName() <=> b.getSimpleName() }.
-        each { createEnum(it, enumCSharpToJavaNames) }
-
-def lastIndex = (enumCSharpToJavaNames.size() - 1);
-def body = new StringBuilder()
-enumCSharpToJavaNames.eachWithIndex{ node, i ->
-    body.append("""{"$node.key", "$node.value"}""")
-    body.append(i == lastIndex ? "\n" : ",\n            ")
-}
-
-def namingConversionsTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/NamingConversions.template")).make(["body":body])
-def namingConversionsFile = new File("${projectBaseDir}/src/Gremlin.Net/Process/Traversal/NamingConversions.cs")
-namingConversionsFile.newWriter().withWriter{ it << namingConversionsTemplate }
+        each { createEnum(it) }
 
 def determineVersion = {
     def env = System.getenv()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
index 555d372..6c00f99 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
@@ -26,9 +26,14 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Barrier
+    public class Barrier : EnumWrapper
     {
-        NormSack
+        private Barrier(string enumValue)
+            : base("Barrier", enumValue)
+        {            
+        }
+
+        public static Barrier NormSack => new Barrier("normSack");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
index 5a07258..f158153 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
@@ -26,11 +26,16 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Cardinality
+    public class Cardinality : EnumWrapper
     {
-        List,
-		Set,
-		Single
+        private Cardinality(string enumValue)
+            : base("Cardinality", enumValue)
+        {            
+        }
+
+        public static Cardinality List => new Cardinality("list");
+		public static Cardinality Set => new Cardinality("set");
+		public static Cardinality Single => new Cardinality("single");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
index 432323f..3daaa4d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Column
+    public class Column : EnumWrapper
     {
-        Keys,
-		Values
+        private Column(string enumValue)
+            : base("Column", enumValue)
+        {            
+        }
+
+        public static Column Keys => new Column("keys");
+		public static Column Values => new Column("values");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
index 6f19748..9566d51 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
@@ -26,11 +26,16 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Direction
+    public class Direction : EnumWrapper
     {
-        Both,
-		In,
-		Out
+        private Direction(string enumValue)
+            : base("Direction", enumValue)
+        {            
+        }
+
+        public static Direction Both => new Direction("BOTH");
+		public static Direction In => new Direction("IN");
+		public static Direction Out => new Direction("OUT");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
new file mode 100644
index 0000000..66b8c5a
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
@@ -0,0 +1,52 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents an enum.
+    /// </summary>
+    public abstract class EnumWrapper
+    {
+        /// <summary>
+        ///     Gets the name of the enum.
+        /// </summary>
+        public string EnumName { get; }
+
+        /// <summary>
+        ///     Gets the value of the enum.
+        /// </summary>
+        public string EnumValue { get; }
+
+        /// <summary>
+        ///     Initializes a new instance of the <see cref="EnumWrapper" /> class.
+        /// </summary>
+        /// <param name="enumName">The name of the enum.</param>
+        /// <param name="enumValue">The value of the enum.</param>
+        protected EnumWrapper(string enumName, string enumValue)
+        {
+            EnumName = enumName;
+            EnumValue = enumValue;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
index e978bc6..ad73ad1 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum GraphSONVersion
+    public class GraphSONVersion : EnumWrapper
     {
-        V1_0,
-		V2_0
+        private GraphSONVersion(string enumValue)
+            : base("GraphSONVersion", enumValue)
+        {            
+        }
+
+        public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0");
+		public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
index 5ee7358..45387e2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
@@ -26,9 +26,14 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum GryoVersion
+    public class GryoVersion : EnumWrapper
     {
-        V1_0
+        private GryoVersion(string enumValue)
+            : base("GryoVersion", enumValue)
+        {            
+        }
+
+        public static GryoVersion V1_0 => new GryoVersion("V1_0");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
deleted file mode 100644
index aecdc57..0000000
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-#region License
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#endregion
-
-using System.Collections.Generic;
-
-// THIS IS A GENERATED FILE - DO NOT MODIFY THIS FILE DIRECTLY - see pom.xml
-namespace Gremlin.Net.Process.Traversal
-{
-    internal static class NamingConversions
-    {
-        /// <summary>
-        ///     Gets the Java name equivalent for a given enum value
-        /// </summary>
-        internal static string GetEnumJavaName(string typeName, string value)
-        {
-            var key = $"{typeName}.{value}";
-            string javaName;
-            if (!CSharpToJavaEnums.TryGetValue(key, out javaName))
-            {
-                throw new KeyNotFoundException($"Java name for {key} not found");
-            }
-            return javaName;
-        }
-
-        internal static readonly IDictionary<string, string> CSharpToJavaEnums = new Dictionary<string, string>
-        {
-            {"Barrier.NormSack", "normSack"},
-            {"Cardinality.List", "list"},
-            {"Cardinality.Set", "set"},
-            {"Cardinality.Single", "single"},
-            {"Column.Keys", "keys"},
-            {"Column.Values", "values"},
-            {"Direction.Both", "BOTH"},
-            {"Direction.In", "IN"},
-            {"Direction.Out", "OUT"},
-            {"GraphSONVersion.V1_0", "V1_0"},
-            {"GraphSONVersion.V2_0", "V2_0"},
-            {"GryoVersion.V1_0", "V1_0"},
-            {"Operator.AddAll", "addAll"},
-            {"Operator.And", "and"},
-            {"Operator.Assign", "assign"},
-            {"Operator.Div", "div"},
-            {"Operator.Max", "max"},
-            {"Operator.Min", "min"},
-            {"Operator.Minus", "minus"},
-            {"Operator.Mult", "mult"},
-            {"Operator.Or", "or"},
-            {"Operator.Sum", "sum"},
-            {"Operator.SumLong", "sumLong"},
-            {"Order.Decr", "decr"},
-            {"Order.Incr", "incr"},
-            {"Order.KeyDecr", "keyDecr"},
-            {"Order.KeyIncr", "keyIncr"},
-            {"Order.Shuffle", "shuffle"},
-            {"Order.ValueDecr", "valueDecr"},
-            {"Order.ValueIncr", "valueIncr"},
-            {"Pick.Any", "any"},
-            {"Pick.None", "none"},
-            {"Pop.All", "all"},
-            {"Pop.First", "first"},
-            {"Pop.Last", "last"},
-            {"Scope.Global", "global"},
-            {"Scope.Local", "local"},
-            {"T.Id", "id"},
-            {"T.Key", "key"},
-            {"T.Label", "label"},
-            {"T.Value", "value"}
-
-        };
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
index 72b0048..699a5a5 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
@@ -26,19 +26,24 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Operator
+    public class Operator : EnumWrapper
     {
-        AddAll,
-		And,
-		Assign,
-		Div,
-		Max,
-		Min,
-		Minus,
-		Mult,
-		Or,
-		Sum,
-		SumLong
+        private Operator(string enumValue)
+            : base("Operator", enumValue)
+        {            
+        }
+
+        public static Operator AddAll => new Operator("addAll");
+		public static Operator And => new Operator("and");
+		public static Operator Assign => new Operator("assign");
+		public static Operator Div => new Operator("div");
+		public static Operator Max => new Operator("max");
+		public static Operator Min => new Operator("min");
+		public static Operator Minus => new Operator("minus");
+		public static Operator Mult => new Operator("mult");
+		public static Operator Or => new Operator("or");
+		public static Operator Sum => new Operator("sum");
+		public static Operator SumLong => new Operator("sumLong");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index 1f12710..93bf7bc 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@ -26,15 +26,20 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Order
+    public class Order : EnumWrapper
     {
-        Decr,
-		Incr,
-		KeyDecr,
-		KeyIncr,
-		Shuffle,
-		ValueDecr,
-		ValueIncr
+        private Order(string enumValue)
+            : base("Order", enumValue)
+        {            
+        }
+
+        public static Order Decr => new Order("decr");
+		public static Order Incr => new Order("incr");
+		public static Order KeyDecr => new Order("keyDecr");
+		public static Order KeyIncr => new Order("keyIncr");
+		public static Order Shuffle => new Order("shuffle");
+		public static Order ValueDecr => new Order("valueDecr");
+		public static Order ValueIncr => new Order("valueIncr");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
index e6394ae..a47d4a6 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Pick
+    public class Pick : EnumWrapper
     {
-        Any,
-		None
+        private Pick(string enumValue)
+            : base("Pick", enumValue)
+        {            
+        }
+
+        public static Pick Any => new Pick("any");
+		public static Pick None => new Pick("none");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
index a7a8403..9e97a09 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
@@ -26,11 +26,16 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Pop
+    public class Pop : EnumWrapper
     {
-        All,
-		First,
-		Last
+        private Pop(string enumValue)
+            : base("Pop", enumValue)
+        {            
+        }
+
+        public static Pop All => new Pop("all");
+		public static Pop First => new Pop("first");
+		public static Pop Last => new Pop("last");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
index d5af93a..65a6e67 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Scope
+    public class Scope : EnumWrapper
     {
-        Global,
-		Local
+        private Scope(string enumValue)
+            : base("Scope", enumValue)
+        {            
+        }
+
+        public static Scope Global => new Scope("global");
+		public static Scope Local => new Scope("local");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
index c21b50a..9eba458 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
@@ -26,12 +26,17 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum T
+    public class T : EnumWrapper
     {
-        Id,
-		Key,
-		Label,
-		Value
+        private T(string enumValue)
+            : base("T", enumValue)
+        {            
+        }
+
+        public static T Id => new T("id");
+		public static T Key => new T("key");
+		public static T Label => new T("label");
+		public static T Value => new T("value");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
index b4ab870..ccea7cd 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
@@ -30,9 +30,8 @@ namespace Gremlin.Net.Structure.IO.GraphSON
     {
         public Dictionary<string, dynamic> Dictify(dynamic objectData, GraphSONWriter writer)
         {
-            var enumName = objectData.GetType().Name;
-            var valueJavaName = NamingConversions.GetEnumJavaName(enumName, objectData.ToString());
-            return GraphSONUtil.ToTypedValue(enumName, valueJavaName);
+            EnumWrapper enumToSerialize = objectData;
+            return GraphSONUtil.ToTypedValue(enumToSerialize.EnumName, enumToSerialize.EnumValue);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
index a60a558..d5b7acc 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
@@ -53,7 +53,7 @@ namespace Gremlin.Net.Structure.IO.GraphSON
                 {typeof(Guid), new UuidSerializer()},
                 {typeof(DateTimeOffset), new DateSerializer()},
                 {typeof(Type), new ClassSerializer()},
-                {typeof(Enum), new EnumSerializer()},
+                {typeof(EnumWrapper), new EnumSerializer()},
                 {typeof(TraversalPredicate), new TraversalPredicateSerializer()},
                 {typeof(Vertex), new VertexSerializer()},
                 {typeof(Edge), new EdgeSerializer()},

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
index c305df7..9457cae 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
@@ -26,7 +26,6 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
 using Gremlin.Net.Process.Traversal;
-using TEnum = Gremlin.Net.Process.Traversal.T;
 
 namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
 {
@@ -38,7 +37,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
         private readonly string _text;
 
         private static readonly IDictionary<string, Type> EnumTypesByName = typeof(Scope).GetTypeInfo().Assembly
-            .GetTypes().Where(t => t.GetTypeInfo().IsEnum && t.GetTypeInfo().IsPublic)
+            .GetTypes().Where(t => t.GetTypeInfo().IsSubclassOf(typeof(EnumWrapper)) && t.GetTypeInfo().IsPublic)
             .ToDictionary(e => e.Name, e => e);
         
         private readonly object _value;
@@ -55,7 +54,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
             }
             _type = type;
             var valueName = text.Substring(separatorIndex + 1);
-            _value = Enum.Parse(type, GetCsharpName(valueName));
+            _value = _type.GetProperty(GetCsharpName(valueName)).GetValue(null);
         }
 
         private string GetCsharpName(string valueText)


[03/20] tinkerpop git commit: TINKERPOP-1901 Transformed Gremlin.Net enums into classes

Posted by fl...@apache.org.
TINKERPOP-1901 Transformed Gremlin.Net enums into classes


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

Branch: refs/heads/tp33
Commit: dcf3da3917a9626d432ef26089bb05c6a15158ed
Parents: ab66ed3
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sat Mar 10 19:17:15 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sat Mar 10 19:17:15 2018 +0100

----------------------------------------------------------------------
 docs/src/reference/gremlin-variants.asciidoc    |  2 +-
 gremlin-dotnet/glv/Enum.template                |  7 +-
 gremlin-dotnet/glv/generate.groovy              | 21 +----
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  9 +-
 .../Process/Traversal/Cardinality.cs            | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Column.cs | 11 ++-
 .../Gremlin.Net/Process/Traversal/Direction.cs  | 13 ++-
 .../Process/Traversal/EnumWrapper.cs            | 52 +++++++++++
 .../Process/Traversal/GraphSONVersion.cs        | 11 ++-
 .../Process/Traversal/GryoVersion.cs            |  9 +-
 .../Process/Traversal/NamingConversions.cs      | 91 --------------------
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 29 ++++---
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 21 +++--
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 15 ++--
 .../Structure/IO/GraphSON/EnumSerializer.cs     |  5 +-
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |  2 +-
 .../TraversalEnumParameter.cs                   |  5 +-
 20 files changed, 181 insertions(+), 170 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc
index f06fe02..ace8119 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -362,7 +362,7 @@ terminal/action methods off of `ITraversal`.
 
 === Static Enums and Methods
 
-Gremlin has various tokens (e.g. `T`, `P`, `Order`, `Operator`, etc.) that are represented in Gremlin.Net as Enums.
+Gremlin has various tokens (e.g. `T`, `P`, `Order`, `Operator`, etc.) that are represented in Gremlin.Net as classes.
 
 These can be used analogously to how they are used in Gremlin-Java.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/glv/Enum.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Enum.template b/gremlin-dotnet/glv/Enum.template
index 1fddab1..fd09312 100644
--- a/gremlin-dotnet/glv/Enum.template
+++ b/gremlin-dotnet/glv/Enum.template
@@ -26,8 +26,13 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum <%= enumClass.simpleName %>
+    public class <%= enumClass.simpleName %> : EnumWrapper
     {
+        private <%= enumClass.simpleName %>(string enumValue)
+            : base("<%= enumClass.simpleName %>", enumValue)
+        {            
+        }
+
         <%= constants %>
     }
     

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 12cfa88..7894793 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -339,36 +339,23 @@ def toCSharpName = { enumClass, itemName ->
     return itemName.substring(0, 1).toUpperCase() + itemName.substring(1)
 }
 
-def createEnum = { enumClass, csharpToJava ->
+def createEnum = { enumClass ->
     def b = ["enumClass": enumClass,
              "constants": enumClass.getEnumConstants().
                     sort { a, b -> a.name() <=> b.name() }.
                     collect { value ->
                         def csharpName = toCSharpName(enumClass, value.name())
-                        csharpToJava.put(enumClass.simpleName + "." + csharpName, value.name())
-                        return csharpName
-                    }.join(",\n\t\t")]
+                        return "public static ${enumClass.simpleName} ${csharpName} => new ${enumClass.simpleName}(\"${value.name()}\");"
+                    }.join("\n\t\t")]
 
     def enumTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/Enum.template")).make(b)
     def enumFile = new File("${projectBaseDir}/src/Gremlin.Net/Process/Traversal/" + enumClass.getSimpleName() + ".cs")
     enumFile.newWriter().withWriter{ it << enumTemplate }
 }
 
-def enumCSharpToJavaNames = [:]
 CoreImports.getClassImports().findAll { Enum.class.isAssignableFrom(it) }.
         sort { a, b -> a.getSimpleName() <=> b.getSimpleName() }.
-        each { createEnum(it, enumCSharpToJavaNames) }
-
-def lastIndex = (enumCSharpToJavaNames.size() - 1);
-def body = new StringBuilder()
-enumCSharpToJavaNames.eachWithIndex{ node, i ->
-    body.append("""{"$node.key", "$node.value"}""")
-    body.append(i == lastIndex ? "\n" : ",\n            ")
-}
-
-def namingConversionsTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/NamingConversions.template")).make(["body":body])
-def namingConversionsFile = new File("${projectBaseDir}/src/Gremlin.Net/Process/Traversal/NamingConversions.cs")
-namingConversionsFile.newWriter().withWriter{ it << namingConversionsTemplate }
+        each { createEnum(it) }
 
 def determineVersion = {
     def env = System.getenv()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
index 555d372..6c00f99 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
@@ -26,9 +26,14 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Barrier
+    public class Barrier : EnumWrapper
     {
-        NormSack
+        private Barrier(string enumValue)
+            : base("Barrier", enumValue)
+        {            
+        }
+
+        public static Barrier NormSack => new Barrier("normSack");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
index 5a07258..f158153 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
@@ -26,11 +26,16 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Cardinality
+    public class Cardinality : EnumWrapper
     {
-        List,
-		Set,
-		Single
+        private Cardinality(string enumValue)
+            : base("Cardinality", enumValue)
+        {            
+        }
+
+        public static Cardinality List => new Cardinality("list");
+		public static Cardinality Set => new Cardinality("set");
+		public static Cardinality Single => new Cardinality("single");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
index 432323f..3daaa4d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Column
+    public class Column : EnumWrapper
     {
-        Keys,
-		Values
+        private Column(string enumValue)
+            : base("Column", enumValue)
+        {            
+        }
+
+        public static Column Keys => new Column("keys");
+		public static Column Values => new Column("values");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
index 6f19748..9566d51 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
@@ -26,11 +26,16 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Direction
+    public class Direction : EnumWrapper
     {
-        Both,
-		In,
-		Out
+        private Direction(string enumValue)
+            : base("Direction", enumValue)
+        {            
+        }
+
+        public static Direction Both => new Direction("BOTH");
+		public static Direction In => new Direction("IN");
+		public static Direction Out => new Direction("OUT");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
new file mode 100644
index 0000000..66b8c5a
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/EnumWrapper.cs
@@ -0,0 +1,52 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents an enum.
+    /// </summary>
+    public abstract class EnumWrapper
+    {
+        /// <summary>
+        ///     Gets the name of the enum.
+        /// </summary>
+        public string EnumName { get; }
+
+        /// <summary>
+        ///     Gets the value of the enum.
+        /// </summary>
+        public string EnumValue { get; }
+
+        /// <summary>
+        ///     Initializes a new instance of the <see cref="EnumWrapper" /> class.
+        /// </summary>
+        /// <param name="enumName">The name of the enum.</param>
+        /// <param name="enumValue">The value of the enum.</param>
+        protected EnumWrapper(string enumName, string enumValue)
+        {
+            EnumName = enumName;
+            EnumValue = enumValue;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
index e978bc6..ad73ad1 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum GraphSONVersion
+    public class GraphSONVersion : EnumWrapper
     {
-        V1_0,
-		V2_0
+        private GraphSONVersion(string enumValue)
+            : base("GraphSONVersion", enumValue)
+        {            
+        }
+
+        public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0");
+		public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
index 5ee7358..45387e2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
@@ -26,9 +26,14 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum GryoVersion
+    public class GryoVersion : EnumWrapper
     {
-        V1_0
+        private GryoVersion(string enumValue)
+            : base("GryoVersion", enumValue)
+        {            
+        }
+
+        public static GryoVersion V1_0 => new GryoVersion("V1_0");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
deleted file mode 100644
index aecdc57..0000000
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/NamingConversions.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-#region License
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#endregion
-
-using System.Collections.Generic;
-
-// THIS IS A GENERATED FILE - DO NOT MODIFY THIS FILE DIRECTLY - see pom.xml
-namespace Gremlin.Net.Process.Traversal
-{
-    internal static class NamingConversions
-    {
-        /// <summary>
-        ///     Gets the Java name equivalent for a given enum value
-        /// </summary>
-        internal static string GetEnumJavaName(string typeName, string value)
-        {
-            var key = $"{typeName}.{value}";
-            string javaName;
-            if (!CSharpToJavaEnums.TryGetValue(key, out javaName))
-            {
-                throw new KeyNotFoundException($"Java name for {key} not found");
-            }
-            return javaName;
-        }
-
-        internal static readonly IDictionary<string, string> CSharpToJavaEnums = new Dictionary<string, string>
-        {
-            {"Barrier.NormSack", "normSack"},
-            {"Cardinality.List", "list"},
-            {"Cardinality.Set", "set"},
-            {"Cardinality.Single", "single"},
-            {"Column.Keys", "keys"},
-            {"Column.Values", "values"},
-            {"Direction.Both", "BOTH"},
-            {"Direction.In", "IN"},
-            {"Direction.Out", "OUT"},
-            {"GraphSONVersion.V1_0", "V1_0"},
-            {"GraphSONVersion.V2_0", "V2_0"},
-            {"GryoVersion.V1_0", "V1_0"},
-            {"Operator.AddAll", "addAll"},
-            {"Operator.And", "and"},
-            {"Operator.Assign", "assign"},
-            {"Operator.Div", "div"},
-            {"Operator.Max", "max"},
-            {"Operator.Min", "min"},
-            {"Operator.Minus", "minus"},
-            {"Operator.Mult", "mult"},
-            {"Operator.Or", "or"},
-            {"Operator.Sum", "sum"},
-            {"Operator.SumLong", "sumLong"},
-            {"Order.Decr", "decr"},
-            {"Order.Incr", "incr"},
-            {"Order.KeyDecr", "keyDecr"},
-            {"Order.KeyIncr", "keyIncr"},
-            {"Order.Shuffle", "shuffle"},
-            {"Order.ValueDecr", "valueDecr"},
-            {"Order.ValueIncr", "valueIncr"},
-            {"Pick.Any", "any"},
-            {"Pick.None", "none"},
-            {"Pop.All", "all"},
-            {"Pop.First", "first"},
-            {"Pop.Last", "last"},
-            {"Scope.Global", "global"},
-            {"Scope.Local", "local"},
-            {"T.Id", "id"},
-            {"T.Key", "key"},
-            {"T.Label", "label"},
-            {"T.Value", "value"}
-
-        };
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
index 72b0048..699a5a5 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
@@ -26,19 +26,24 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Operator
+    public class Operator : EnumWrapper
     {
-        AddAll,
-		And,
-		Assign,
-		Div,
-		Max,
-		Min,
-		Minus,
-		Mult,
-		Or,
-		Sum,
-		SumLong
+        private Operator(string enumValue)
+            : base("Operator", enumValue)
+        {            
+        }
+
+        public static Operator AddAll => new Operator("addAll");
+		public static Operator And => new Operator("and");
+		public static Operator Assign => new Operator("assign");
+		public static Operator Div => new Operator("div");
+		public static Operator Max => new Operator("max");
+		public static Operator Min => new Operator("min");
+		public static Operator Minus => new Operator("minus");
+		public static Operator Mult => new Operator("mult");
+		public static Operator Or => new Operator("or");
+		public static Operator Sum => new Operator("sum");
+		public static Operator SumLong => new Operator("sumLong");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index 1f12710..93bf7bc 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@ -26,15 +26,20 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Order
+    public class Order : EnumWrapper
     {
-        Decr,
-		Incr,
-		KeyDecr,
-		KeyIncr,
-		Shuffle,
-		ValueDecr,
-		ValueIncr
+        private Order(string enumValue)
+            : base("Order", enumValue)
+        {            
+        }
+
+        public static Order Decr => new Order("decr");
+		public static Order Incr => new Order("incr");
+		public static Order KeyDecr => new Order("keyDecr");
+		public static Order KeyIncr => new Order("keyIncr");
+		public static Order Shuffle => new Order("shuffle");
+		public static Order ValueDecr => new Order("valueDecr");
+		public static Order ValueIncr => new Order("valueIncr");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
index e6394ae..a47d4a6 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Pick
+    public class Pick : EnumWrapper
     {
-        Any,
-		None
+        private Pick(string enumValue)
+            : base("Pick", enumValue)
+        {            
+        }
+
+        public static Pick Any => new Pick("any");
+		public static Pick None => new Pick("none");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
index a7a8403..9e97a09 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
@@ -26,11 +26,16 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Pop
+    public class Pop : EnumWrapper
     {
-        All,
-		First,
-		Last
+        private Pop(string enumValue)
+            : base("Pop", enumValue)
+        {            
+        }
+
+        public static Pop All => new Pop("all");
+		public static Pop First => new Pop("first");
+		public static Pop Last => new Pop("last");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
index d5af93a..65a6e67 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
@@ -26,10 +26,15 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum Scope
+    public class Scope : EnumWrapper
     {
-        Global,
-		Local
+        private Scope(string enumValue)
+            : base("Scope", enumValue)
+        {            
+        }
+
+        public static Scope Global => new Scope("global");
+		public static Scope Local => new Scope("local");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
index c21b50a..9eba458 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
@@ -26,12 +26,17 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public enum T
+    public class T : EnumWrapper
     {
-        Id,
-		Key,
-		Label,
-		Value
+        private T(string enumValue)
+            : base("T", enumValue)
+        {            
+        }
+
+        public static T Id => new T("id");
+		public static T Key => new T("key");
+		public static T Label => new T("label");
+		public static T Value => new T("value");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
index b4ab870..ccea7cd 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/EnumSerializer.cs
@@ -30,9 +30,8 @@ namespace Gremlin.Net.Structure.IO.GraphSON
     {
         public Dictionary<string, dynamic> Dictify(dynamic objectData, GraphSONWriter writer)
         {
-            var enumName = objectData.GetType().Name;
-            var valueJavaName = NamingConversions.GetEnumJavaName(enumName, objectData.ToString());
-            return GraphSONUtil.ToTypedValue(enumName, valueJavaName);
+            EnumWrapper enumToSerialize = objectData;
+            return GraphSONUtil.ToTypedValue(enumToSerialize.EnumName, enumToSerialize.EnumValue);
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
index a60a558..d5b7acc 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
@@ -53,7 +53,7 @@ namespace Gremlin.Net.Structure.IO.GraphSON
                 {typeof(Guid), new UuidSerializer()},
                 {typeof(DateTimeOffset), new DateSerializer()},
                 {typeof(Type), new ClassSerializer()},
-                {typeof(Enum), new EnumSerializer()},
+                {typeof(EnumWrapper), new EnumSerializer()},
                 {typeof(TraversalPredicate), new TraversalPredicateSerializer()},
                 {typeof(Vertex), new VertexSerializer()},
                 {typeof(Edge), new EdgeSerializer()},

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dcf3da39/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
index c305df7..9457cae 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalEnumParameter.cs
@@ -26,7 +26,6 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
 using Gremlin.Net.Process.Traversal;
-using TEnum = Gremlin.Net.Process.Traversal.T;
 
 namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
 {
@@ -38,7 +37,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
         private readonly string _text;
 
         private static readonly IDictionary<string, Type> EnumTypesByName = typeof(Scope).GetTypeInfo().Assembly
-            .GetTypes().Where(t => t.GetTypeInfo().IsEnum && t.GetTypeInfo().IsPublic)
+            .GetTypes().Where(t => t.GetTypeInfo().IsSubclassOf(typeof(EnumWrapper)) && t.GetTypeInfo().IsPublic)
             .ToDictionary(e => e.Name, e => e);
         
         private readonly object _value;
@@ -55,7 +54,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
             }
             _type = type;
             var valueName = text.Substring(separatorIndex + 1);
-            _value = Enum.Parse(type, GetCsharpName(valueName));
+            _value = _type.GetProperty(GetCsharpName(valueName)).GetValue(null);
         }
 
         private string GetCsharpName(string valueText)


[15/20] tinkerpop git commit: Merge branch 'TINKERPOP-1901' into tp32

Posted by fl...@apache.org.
Merge branch 'TINKERPOP-1901' into tp32


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

Branch: refs/heads/master
Commit: 504933975d2fbbeb61aa724f38aa8b7c888f63ea
Parents: f02f94f df989dc
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 19:27:58 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 19:27:58 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/reference/gremlin-variants.asciidoc    |  2 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   | 11 +++
 gremlin-dotnet/glv/Enum.template                |  9 +-
 gremlin-dotnet/glv/generate.groovy              | 41 ++++-----
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  9 +-
 .../Process/Traversal/Cardinality.cs            | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Column.cs | 11 ++-
 .../Gremlin.Net/Process/Traversal/Direction.cs  | 13 ++-
 .../Process/Traversal/EnumWrapper.cs            | 52 +++++++++++
 .../Process/Traversal/GraphSONVersion.cs        | 11 ++-
 .../Process/Traversal/GraphTraversal.cs         | 45 ++++++----
 .../Process/Traversal/GraphTraversalSource.cs   | 14 ++-
 .../Process/Traversal/GryoVersion.cs            |  9 +-
 .../Process/Traversal/IBiFunction.cs            | 33 +++++++
 .../Process/Traversal/IBinaryOperator.cs        | 34 ++++++++
 .../Process/Traversal/IComparator.cs            | 32 +++++++
 .../Gremlin.Net/Process/Traversal/IConsumer.cs  | 33 +++++++
 .../Gremlin.Net/Process/Traversal/IFunction.cs  | 32 +++++++
 .../Gremlin.Net/Process/Traversal/IPredicate.cs | 32 +++++++
 .../Process/Traversal/NamingConversions.cs      | 91 --------------------
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 29 ++++---
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 21 +++--
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 15 ++--
 .../Process/Traversal/TraversalPredicate.cs     |  2 +-
 .../src/Gremlin.Net/Process/Traversal/__.cs     | 28 +++---
 .../Structure/IO/GraphSON/EnumSerializer.cs     |  5 +-
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |  2 +-
 .../TraversalEnumParameter.cs                   |  5 +-
 32 files changed, 457 insertions(+), 213 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/50493397/CHANGELOG.asciidoc
----------------------------------------------------------------------


[11/20] tinkerpop git commit: TINKERPOP-1901 Describe improved Gremlin.Net tokens in upgrade docs

Posted by fl...@apache.org.
TINKERPOP-1901 Describe improved Gremlin.Net tokens in upgrade docs


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

Branch: refs/heads/tp32
Commit: df989dc40ab7cf834b6ed275c453c4bb220315bf
Parents: 4d5768b
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 19:26:00 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 19:26:00 2018 +0100

----------------------------------------------------------------------
 docs/src/upgrade/release-3.2.x-incubating.asciidoc | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/df989dc4/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 7d2a80c..0cb8ddc 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -42,6 +42,17 @@ by clients that might mysteriously disappear without properly closing their conn
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1726[TINKERPOP-1726]
 
+==== Gremlin.Net Tokens Improved
+
+The various Gremlin tokens (e.g. `T`, `Order`, `Operator`, etc.) that were implemented as Enums before in Gremlin.Net
+are now implemented as classes. This mainly allows them to implement interfaces which their Java counterparts already
+did. `T` for example now implements the new interface `IFunction` which simply mirrors its Java counterpart `Function`.
+Steps that expect objects for those interfaces as arguments now explicitly use the interface. Before, they used just
+`object` as the type for these arguments which made it hard for users to know what kind of `object` they can use.
+However, usage of these tokens themselves shouldn't change at all (e.g. `T.Id` is still `T.Id`).
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1901[TINKERPOP-1901]
+
 === Upgrading for Providers
 
 ==== Graph System Providers


[17/20] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by fl...@apache.org.
Merge branch 'tp32' into tp33


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

Branch: refs/heads/master
Commit: 8cf71aea2439e76653894c779ba7f871a6c44248
Parents: f9f3d4f 5049339
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 21:02:58 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 21:02:58 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/reference/gremlin-variants.asciidoc    |  2 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   | 11 +++++
 gremlin-dotnet/glv/Enum.template                |  9 +++-
 gremlin-dotnet/glv/generate.groovy              | 41 +++++++--------
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  9 +++-
 .../Process/Traversal/Cardinality.cs            | 13 +++--
 .../src/Gremlin.Net/Process/Traversal/Column.cs | 11 +++--
 .../Gremlin.Net/Process/Traversal/Direction.cs  | 13 +++--
 .../Process/Traversal/EnumWrapper.cs            | 52 ++++++++++++++++++++
 .../Process/Traversal/GraphSONVersion.cs        | 13 +++--
 .../Process/Traversal/GraphTraversal.cs         | 43 +++++++++-------
 .../Process/Traversal/GraphTraversalSource.cs   | 14 ++++--
 .../Process/Traversal/GryoVersion.cs            | 11 +++--
 .../Process/Traversal/IBiFunction.cs            | 33 +++++++++++++
 .../Process/Traversal/IBinaryOperator.cs        | 34 +++++++++++++
 .../Process/Traversal/IComparator.cs            | 32 ++++++++++++
 .../Gremlin.Net/Process/Traversal/IConsumer.cs  | 33 +++++++++++++
 .../Gremlin.Net/Process/Traversal/IFunction.cs  | 32 ++++++++++++
 .../Gremlin.Net/Process/Traversal/IPredicate.cs | 32 ++++++++++++
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 29 ++++++-----
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 13 +++--
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   | 11 +++--
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    | 15 ++++--
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  | 11 +++--
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 15 ++++--
 .../Process/Traversal/TraversalPredicate.cs     |  2 +-
 .../src/Gremlin.Net/Process/Traversal/__.cs     | 26 +++++-----
 .../Structure/IO/GraphSON/EnumSerializer.cs     |  5 +-
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |  2 +-
 .../TraversalEnumParameter.cs                   |  5 +-
 31 files changed, 454 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/CHANGELOG.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
index 31187ac,0c92607..e55be6b
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
@@@ -26,11 -26,15 +26,16 @@@ namespace Gremlin.Net.Process.Traversa
  {
  #pragma warning disable 1591
  
-     public enum GraphSONVersion
+     public class GraphSONVersion : EnumWrapper
      {
-         V1_0,
- 		V2_0,
- 		V3_0
+         private GraphSONVersion(string enumValue)
+             : base("GraphSONVersion", enumValue)
+         {            
+         }
+  
+         public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0"); 
 -        public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
++        public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0"); 
++        public static GraphSONVersion V3_0 => new GraphSONVersion("V3_0");
      }
      
  #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
index f2b025a,fcc746e..93fc369
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
@@@ -26,10 -26,14 +26,15 @@@ namespace Gremlin.Net.Process.Traversa
  {
  #pragma warning disable 1591
  
-     public enum GryoVersion
+     public class GryoVersion : EnumWrapper
      {
-         V1_0,
- 		V3_0
+         private GryoVersion(string enumValue)
+             : base("GryoVersion", enumValue)
+         {            
+         }
+  
 -        public static GryoVersion V1_0 => new GryoVersion("V1_0");
++        public static GryoVersion V1_0 => new GryoVersion("V1_0"); 
++        public static GryoVersion V3_0 => new GryoVersion("V3_0");
      }
      
  #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index 197f58b,44ccb9b..c6a1817
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@@ -26,11 -26,20 +26,16 @@@ namespace Gremlin.Net.Process.Traversa
  {
  #pragma warning disable 1591
  
-     public enum Order
+     public class Order : EnumWrapper, IComparator
      {
-         Decr,
- 		Incr,
- 		Shuffle
+         private Order(string enumValue)
+             : base("Order", enumValue)
+         {            
+         }
+  
+         public static Order Decr => new Order("decr"); 
+         public static Order Incr => new Order("incr"); 
 -        public static Order KeyDecr => new Order("keyDecr"); 
 -        public static Order KeyIncr => new Order("keyIncr"); 
 -        public static Order Shuffle => new Order("shuffle"); 
 -        public static Order ValueDecr => new Order("valueDecr"); 
 -        public static Order ValueIncr => new Order("valueIncr");
++        public static Order Shuffle => new Order("shuffle");
      }
      
  #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
index 5f3881d,8a157c5..d1915fc
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
@@@ -26,12 -26,16 +26,17 @@@ namespace Gremlin.Net.Process.Traversa
  {
  #pragma warning disable 1591
  
-     public enum Pop
+     public class Pop : EnumWrapper
      {
-         All,
- 		First,
- 		Last,
- 		Mixed
+         private Pop(string enumValue)
+             : base("Pop", enumValue)
+         {            
+         }
+  
+         public static Pop All => new Pop("all"); 
+         public static Pop First => new Pop("first"); 
 -        public static Pop Last => new Pop("last");
++        public static Pop Last => new Pop("last"); 
++        public static Pop Mixed => new Pop("mixed");
      }
      
  #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
----------------------------------------------------------------------


[04/20] tinkerpop git commit: TINKERPOP-1901 Add interfaces for tokens in Gremlin.Net

Posted by fl...@apache.org.
TINKERPOP-1901 Add interfaces for tokens in Gremlin.Net

These interfaces simply represent their Java counterparts which allows
to use them as arguments in Gremlin steps.


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

Branch: refs/heads/tp32
Commit: d012171e97d5d87108eef3d0257a8b859f77de04
Parents: dcf3da3
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sat Mar 10 19:21:46 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sat Mar 10 19:21:46 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 gremlin-dotnet/glv/Enum.template                |  2 +-
 gremlin-dotnet/glv/generate.groovy              | 20 ++++++---
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  2 +-
 .../src/Gremlin.Net/Process/Traversal/Column.cs |  2 +-
 .../Process/Traversal/GraphTraversal.cs         | 45 ++++++++++++--------
 .../Process/Traversal/GraphTraversalSource.cs   | 14 ++++--
 .../Process/Traversal/IBiFunction.cs            | 33 ++++++++++++++
 .../Process/Traversal/IBinaryOperator.cs        | 34 +++++++++++++++
 .../Process/Traversal/IComparator.cs            | 32 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/IConsumer.cs  | 33 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/IFunction.cs  | 32 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/IPredicate.cs | 32 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/Operator.cs   |  2 +-
 .../src/Gremlin.Net/Process/Traversal/Order.cs  |  2 +-
 .../src/Gremlin.Net/Process/Traversal/T.cs      |  2 +-
 .../Process/Traversal/TraversalPredicate.cs     |  2 +-
 .../src/Gremlin.Net/Process/Traversal/__.cs     | 28 ++++++------
 18 files changed, 270 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 341a392..568097c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-8]]
 === TinkerPop 3.2.8 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Enums are now represented as classes in Gremlin.Net which allows to use them as arguments in more steps.
 * Bumped to Groovy 2.4.14.
 * Added `checkAdjacentVertices` option to `SubgraphStrategy`.
 * Modified `GremlinDslProcessor` so that it generated the `getAnonymousTraversalClass()` method to return the DSL version of `__`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/glv/Enum.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Enum.template b/gremlin-dotnet/glv/Enum.template
index fd09312..0be23c7 100644
--- a/gremlin-dotnet/glv/Enum.template
+++ b/gremlin-dotnet/glv/Enum.template
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class <%= enumClass.simpleName %> : EnumWrapper
+    public class <%= enumClass.simpleName %> : <%= implementedTypes %>
     {
         private <%= enumClass.simpleName %>(string enumValue)
             : base("<%= enumClass.simpleName %>", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 7894793..6d89b2f 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -48,17 +48,17 @@ def toCSharpTypeMap = ["Long": "long",
                        "TraversalMetrics": "E2",
                        "Traversal": "ITraversal",
                        "Traversal[]": "ITraversal[]",
-                       "Predicate": "TraversalPredicate",
+                       "Predicate": "IPredicate",
                        "P": "TraversalPredicate",
                        "TraversalStrategy": "ITraversalStrategy",
                        "TraversalStrategy[]": "ITraversalStrategy[]",
-                       "Function": "object",
-                       "BiFunction": "object",
+                       "Function": "IFunction",
+                       "BiFunction": "IBiFunction",
                        "UnaryOperator": "object",
-                       "BinaryOperator": "object",
-                       "Consumer": "object",
+                       "BinaryOperator": "IBinaryOperator",
+                       "Consumer": "IConsumer",
                        "Supplier": "object",
-                       "Comparator": "object",
+                       "Comparator": "IComparator",
                        "VertexProgram": "object"]
 
 def useE2 = ["E2", "E2"];
@@ -341,6 +341,14 @@ def toCSharpName = { enumClass, itemName ->
 
 def createEnum = { enumClass ->
     def b = ["enumClass": enumClass,
+             "implementedTypes": enumClass.getInterfaces().
+                    collect { it.getSimpleName() }.
+                    findAll { toCSharpTypeMap.containsKey(it) }.
+                    findAll { toCSharpTypeMap[it] != "object" }.
+                    sort { a, b -> a <=> b }.
+                    collect(["EnumWrapper"]) { typeName ->
+                        return toCSharpTypeMap[typeName]
+                    }.join(", "),
              "constants": enumClass.getEnumConstants().
                     sort { a, b -> a.name() <=> b.name() }.
                     collect { value ->

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
index 6c00f99..0ae4fa2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Barrier : EnumWrapper
+    public class Barrier : EnumWrapper, IConsumer
     {
         private Barrier(string enumValue)
             : base("Barrier", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
index 3daaa4d..9fa2039 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Column : EnumWrapper
+    public class Column : EnumWrapper, IFunction
     {
         private Column(string enumValue)
             : base("Column", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/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 d8e26ad..7100ea3 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -187,7 +187,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the barrier step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Barrier (object barrierConsumer)
+        public GraphTraversal<S, E> Barrier (IConsumer barrierConsumer)
         {
             Bytecode.AddStep("barrier", barrierConsumer);
             return Wrap<S, E>(this);
@@ -236,7 +236,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the branch step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E2> Branch<E2> (object function)
+        public GraphTraversal<S, E2> Branch<E2> (IFunction function)
         {
             Bytecode.AddStep("branch", function);
             return Wrap<S, E2>(this);
@@ -263,7 +263,7 @@ 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 (IComparator comparator)
         {
             Bytecode.AddStep("by", comparator);
             return Wrap<S, E>(this);
@@ -272,7 +272,16 @@ 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 (IFunction function)
+        {
+            Bytecode.AddStep("by", function);
+            return Wrap<S, E>(this);
+        }
+
+        /// <summary>
+        ///     Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
+        /// </summary>
+        public GraphTraversal<S, E> By (IFunction function, IComparator comparator)
         {
             Bytecode.AddStep("by", function, comparator);
             return Wrap<S, E>(this);
@@ -299,7 +308,7 @@ 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 (string key, IComparator comparator)
         {
             Bytecode.AddStep("by", key, comparator);
             return Wrap<S, E>(this);
@@ -326,7 +335,7 @@ 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 (ITraversal traversal, IComparator comparator)
         {
             Bytecode.AddStep("by", traversal, comparator);
             return Wrap<S, E>(this);
@@ -346,7 +355,7 @@ 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> (IFunction choiceFunction)
         {
             Bytecode.AddStep("choose", choiceFunction);
             return Wrap<S, E2>(this);
@@ -355,7 +364,7 @@ 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> (IPredicate choosePredicate, ITraversal trueChoice)
         {
             Bytecode.AddStep("choose", choosePredicate, trueChoice);
             return Wrap<S, E2>(this);
@@ -364,7 +373,7 @@ 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> (IPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
         {
             Bytecode.AddStep("choose", choosePredicate, trueChoice, falseChoice);
             return Wrap<S, E2>(this);
@@ -496,7 +505,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the emit step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Emit (TraversalPredicate emitPredicate)
+        public GraphTraversal<S, E> Emit (IPredicate emitPredicate)
         {
             Bytecode.AddStep("emit", emitPredicate);
             return Wrap<S, E>(this);
@@ -514,7 +523,7 @@ 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 (IPredicate predicate)
         {
             Bytecode.AddStep("filter", predicate);
             return Wrap<S, E>(this);
@@ -532,7 +541,7 @@ 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> (IFunction function)
         {
             Bytecode.AddStep("flatMap", function);
             return Wrap<S, E2>(this);
@@ -559,7 +568,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the fold step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E2> Fold<E2> (E2 seed, object foldFunction)
+        public GraphTraversal<S, E2> Fold<E2> (E2 seed, IBiFunction foldFunction)
         {
             Bytecode.AddStep("fold", seed, foldFunction);
             return Wrap<S, E2>(this);
@@ -942,7 +951,7 @@ 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> (IFunction function)
         {
             Bytecode.AddStep("map", function);
             return Wrap<S, E2>(this);
@@ -1302,7 +1311,7 @@ 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)
+        public GraphTraversal<S, E> Sack (IBiFunction sackOperator)
         {
             Bytecode.AddStep("sack", sackOperator);
             return Wrap<S, E>(this);
@@ -1311,7 +1320,7 @@ 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, E> Sack (IBiFunction sackOperator, string elementPropertyKey)
         {
             Bytecode.AddStep("sack", sackOperator, elementPropertyKey);
             return Wrap<S, E>(this);
@@ -1387,7 +1396,7 @@ 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 (IConsumer consumer)
         {
             Bytecode.AddStep("sideEffect", consumer);
             return Wrap<S, E>(this);
@@ -1591,7 +1600,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the until step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Until (TraversalPredicate untilPredicate)
+        public GraphTraversal<S, E> Until (IPredicate untilPredicate)
         {
             Bytecode.AddStep("until", untilPredicate);
             return Wrap<S, E>(this);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/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 2cbe4de..9c32559 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
@@ -96,7 +96,7 @@ namespace Gremlin.Net.Process.Traversal
             return source;
         }
 
-        public GraphTraversalSource WithSack(object initialValue, object mergeOperator)
+        public GraphTraversalSource WithSack(object initialValue, IBinaryOperator mergeOperator)
         {
             var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
@@ -104,7 +104,15 @@ 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));
+            source.Bytecode.AddSource("withSack", initialValue, splitOperator);
+            return source;
+        }
+
+        public GraphTraversalSource WithSack(object initialValue, object splitOperator, IBinaryOperator mergeOperator)
         {
             var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
@@ -120,7 +128,7 @@ namespace Gremlin.Net.Process.Traversal
             return source;
         }
 
-        public GraphTraversalSource WithSideEffect(string key, object initialValue, object reducer)
+        public GraphTraversalSource WithSideEffect(string key, object initialValue, IBinaryOperator reducer)
         {
             var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs
new file mode 100644
index 0000000..15c9f91
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs
@@ -0,0 +1,33 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents a function that accepts two arguments and produces a result. This is the two-arity specialization of
+    ///     <see cref="IFunction"/>.
+    /// </summary>
+    public interface IBiFunction
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs
new file mode 100644
index 0000000..dcd7aed
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs
@@ -0,0 +1,34 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents an operation upon two operands of the same type, producing a result of the same type as the operands.
+    ///     This is a specialization of <see cref="IBiFunction" /> for the case where the operands and the result are all of
+    ///     the same type.
+    /// </summary>
+    public interface IBinaryOperator : IBiFunction
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs
new file mode 100644
index 0000000..b7a48e0
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs
@@ -0,0 +1,32 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     A comparison function, which imposes a total ordering on some collection of objects.
+    /// </summary>
+    public interface IComparator
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs
new file mode 100644
index 0000000..7eed5e2
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs
@@ -0,0 +1,33 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents an operation that accepts a single input argument and returns no result. Unlike most other functional
+    ///     interfaces, Consumer is expected to operate via side-effects.
+    /// </summary>
+    public interface IConsumer
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs
new file mode 100644
index 0000000..075154a
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs
@@ -0,0 +1,32 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents a function that accepts one argument and produces a result. 
+    /// </summary>
+    public interface IFunction
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs
new file mode 100644
index 0000000..a7e5e3d
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs
@@ -0,0 +1,32 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents a predicate (boolean-valued function) of one argument. 
+    /// </summary>
+    public interface IPredicate
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
index 699a5a5..4116197 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Operator : EnumWrapper
+    public class Operator : EnumWrapper, IBinaryOperator
     {
         private Operator(string enumValue)
             : base("Operator", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index 93bf7bc..d20906a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Order : EnumWrapper
+    public class Order : EnumWrapper, IComparator
     {
         private Order(string enumValue)
             : base("Order", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
index 9eba458..c0e5927 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class T : EnumWrapper
+    public class T : EnumWrapper, IFunction
     {
         private T(string enumValue)
             : base("T", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
index b854213..e8b5be8 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
     /// <summary>
     ///     Represents a predicate (boolean-valued function) used in a <see cref="ITraversal" />.
     /// </summary>
-    public class TraversalPredicate
+    public class TraversalPredicate : IPredicate
     {
         /// <summary>
         ///     Initializes a new instance of the <see cref="TraversalPredicate" /> class.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
index 1788bad..9620e7f 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
@@ -153,7 +153,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the barrier step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Barrier(object barrierConsumer)
+        public static GraphTraversal<object, object> Barrier(IConsumer barrierConsumer)
         {
             return new GraphTraversal<object, object>().Barrier(barrierConsumer);            
         }
@@ -197,7 +197,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the branch step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Branch<E2>(object function)
+        public static GraphTraversal<object, E2> Branch<E2>(IFunction function)
         {
             return new GraphTraversal<object, E2>().Branch<E2>(function);            
         }
@@ -223,7 +223,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the choose step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Choose<E2>(object choiceFunction)
+        public static GraphTraversal<object, E2> Choose<E2>(IFunction choiceFunction)
         {
             return new GraphTraversal<object, E2>().Choose<E2>(choiceFunction);            
         }
@@ -231,7 +231,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the choose step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Choose<E2>(TraversalPredicate choosePredicate, ITraversal trueChoice)
+        public static GraphTraversal<object, E2> Choose<E2>(IPredicate choosePredicate, ITraversal trueChoice)
         {
             return new GraphTraversal<object, E2>().Choose<E2>(choosePredicate, trueChoice);            
         }
@@ -239,7 +239,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the choose step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Choose<E2>(TraversalPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
+        public static GraphTraversal<object, E2> Choose<E2>(IPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
         {
             return new GraphTraversal<object, E2>().Choose<E2>(choosePredicate, trueChoice, falseChoice);            
         }
@@ -357,7 +357,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the emit step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Emit(TraversalPredicate emitPredicate)
+        public static GraphTraversal<object, object> Emit(IPredicate emitPredicate)
         {
             return new GraphTraversal<object, object>().Emit(emitPredicate);            
         }
@@ -373,7 +373,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the filter step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Filter(TraversalPredicate predicate)
+        public static GraphTraversal<object, object> Filter(IPredicate predicate)
         {
             return new GraphTraversal<object, object>().Filter(predicate);            
         }
@@ -389,7 +389,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the flatMap step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> FlatMap<E2>(object function)
+        public static GraphTraversal<object, E2> FlatMap<E2>(IFunction function)
         {
             return new GraphTraversal<object, E2>().FlatMap<E2>(function);            
         }
@@ -413,7 +413,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the fold step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Fold<E2>(E2 seed, object foldFunction)
+        public static GraphTraversal<object, E2> Fold<E2>(E2 seed, IBiFunction foldFunction)
         {
             return new GraphTraversal<object, E2>().Fold<E2>(seed, foldFunction);            
         }
@@ -739,7 +739,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the map step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Map<E2>(object function)
+        public static GraphTraversal<object, E2> Map<E2>(IFunction function)
         {
             return new GraphTraversal<object, E2>().Map<E2>(function);            
         }
@@ -997,7 +997,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the sack step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Sack(object sackOperator)
+        public static GraphTraversal<object, object> Sack(IBiFunction sackOperator)
         {
             return new GraphTraversal<object, object>().Sack(sackOperator);            
         }
@@ -1005,7 +1005,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the sack step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Sack(object sackOperator, string elementPropertyKey)
+        public static GraphTraversal<object, object> Sack(IBiFunction sackOperator, string elementPropertyKey)
         {
             return new GraphTraversal<object, object>().Sack(sackOperator, elementPropertyKey);            
         }
@@ -1073,7 +1073,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the sideEffect step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> SideEffect(object consumer)
+        public static GraphTraversal<object, object> SideEffect(IConsumer consumer)
         {
             return new GraphTraversal<object, object>().SideEffect(consumer);            
         }
@@ -1239,7 +1239,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the until step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Until(TraversalPredicate untilPredicate)
+        public static GraphTraversal<object, object> Until(IPredicate untilPredicate)
         {
             return new GraphTraversal<object, object>().Until(untilPredicate);            
         }


[16/20] tinkerpop git commit: Merge branch 'tp32' into tp33

Posted by fl...@apache.org.
Merge branch 'tp32' into tp33


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

Branch: refs/heads/tp33
Commit: 8cf71aea2439e76653894c779ba7f871a6c44248
Parents: f9f3d4f 5049339
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 21:02:58 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 21:02:58 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/reference/gremlin-variants.asciidoc    |  2 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   | 11 +++++
 gremlin-dotnet/glv/Enum.template                |  9 +++-
 gremlin-dotnet/glv/generate.groovy              | 41 +++++++--------
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  9 +++-
 .../Process/Traversal/Cardinality.cs            | 13 +++--
 .../src/Gremlin.Net/Process/Traversal/Column.cs | 11 +++--
 .../Gremlin.Net/Process/Traversal/Direction.cs  | 13 +++--
 .../Process/Traversal/EnumWrapper.cs            | 52 ++++++++++++++++++++
 .../Process/Traversal/GraphSONVersion.cs        | 13 +++--
 .../Process/Traversal/GraphTraversal.cs         | 43 +++++++++-------
 .../Process/Traversal/GraphTraversalSource.cs   | 14 ++++--
 .../Process/Traversal/GryoVersion.cs            | 11 +++--
 .../Process/Traversal/IBiFunction.cs            | 33 +++++++++++++
 .../Process/Traversal/IBinaryOperator.cs        | 34 +++++++++++++
 .../Process/Traversal/IComparator.cs            | 32 ++++++++++++
 .../Gremlin.Net/Process/Traversal/IConsumer.cs  | 33 +++++++++++++
 .../Gremlin.Net/Process/Traversal/IFunction.cs  | 32 ++++++++++++
 .../Gremlin.Net/Process/Traversal/IPredicate.cs | 32 ++++++++++++
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 29 ++++++-----
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 13 +++--
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   | 11 +++--
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    | 15 ++++--
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  | 11 +++--
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 15 ++++--
 .../Process/Traversal/TraversalPredicate.cs     |  2 +-
 .../src/Gremlin.Net/Process/Traversal/__.cs     | 26 +++++-----
 .../Structure/IO/GraphSON/EnumSerializer.cs     |  5 +-
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |  2 +-
 .../TraversalEnumParameter.cs                   |  5 +-
 31 files changed, 454 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/CHANGELOG.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
index 31187ac,0c92607..e55be6b
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
@@@ -26,11 -26,15 +26,16 @@@ namespace Gremlin.Net.Process.Traversa
  {
  #pragma warning disable 1591
  
-     public enum GraphSONVersion
+     public class GraphSONVersion : EnumWrapper
      {
-         V1_0,
- 		V2_0,
- 		V3_0
+         private GraphSONVersion(string enumValue)
+             : base("GraphSONVersion", enumValue)
+         {            
+         }
+  
+         public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0"); 
 -        public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
++        public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0"); 
++        public static GraphSONVersion V3_0 => new GraphSONVersion("V3_0");
      }
      
  #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
index f2b025a,fcc746e..93fc369
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
@@@ -26,10 -26,14 +26,15 @@@ namespace Gremlin.Net.Process.Traversa
  {
  #pragma warning disable 1591
  
-     public enum GryoVersion
+     public class GryoVersion : EnumWrapper
      {
-         V1_0,
- 		V3_0
+         private GryoVersion(string enumValue)
+             : base("GryoVersion", enumValue)
+         {            
+         }
+  
 -        public static GryoVersion V1_0 => new GryoVersion("V1_0");
++        public static GryoVersion V1_0 => new GryoVersion("V1_0"); 
++        public static GryoVersion V3_0 => new GryoVersion("V3_0");
      }
      
  #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index 197f58b,44ccb9b..c6a1817
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@@ -26,11 -26,20 +26,16 @@@ namespace Gremlin.Net.Process.Traversa
  {
  #pragma warning disable 1591
  
-     public enum Order
+     public class Order : EnumWrapper, IComparator
      {
-         Decr,
- 		Incr,
- 		Shuffle
+         private Order(string enumValue)
+             : base("Order", enumValue)
+         {            
+         }
+  
+         public static Order Decr => new Order("decr"); 
+         public static Order Incr => new Order("incr"); 
 -        public static Order KeyDecr => new Order("keyDecr"); 
 -        public static Order KeyIncr => new Order("keyIncr"); 
 -        public static Order Shuffle => new Order("shuffle"); 
 -        public static Order ValueDecr => new Order("valueDecr"); 
 -        public static Order ValueIncr => new Order("valueIncr");
++        public static Order Shuffle => new Order("shuffle");
      }
      
  #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
index 5f3881d,8a157c5..d1915fc
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
@@@ -26,12 -26,16 +26,17 @@@ namespace Gremlin.Net.Process.Traversa
  {
  #pragma warning disable 1591
  
-     public enum Pop
+     public class Pop : EnumWrapper
      {
-         All,
- 		First,
- 		Last,
- 		Mixed
+         private Pop(string enumValue)
+             : base("Pop", enumValue)
+         {            
+         }
+  
+         public static Pop All => new Pop("all"); 
+         public static Pop First => new Pop("first"); 
 -        public static Pop Last => new Pop("last");
++        public static Pop Last => new Pop("last"); 
++        public static Pop Mixed => new Pop("mixed");
      }
      
  #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8cf71aea/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
----------------------------------------------------------------------


[14/20] tinkerpop git commit: Merge branch 'TINKERPOP-1901' into tp32

Posted by fl...@apache.org.
Merge branch 'TINKERPOP-1901' into tp32


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

Branch: refs/heads/tp33
Commit: 504933975d2fbbeb61aa724f38aa8b7c888f63ea
Parents: f02f94f df989dc
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 19:27:58 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 19:27:58 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/reference/gremlin-variants.asciidoc    |  2 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   | 11 +++
 gremlin-dotnet/glv/Enum.template                |  9 +-
 gremlin-dotnet/glv/generate.groovy              | 41 ++++-----
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  9 +-
 .../Process/Traversal/Cardinality.cs            | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Column.cs | 11 ++-
 .../Gremlin.Net/Process/Traversal/Direction.cs  | 13 ++-
 .../Process/Traversal/EnumWrapper.cs            | 52 +++++++++++
 .../Process/Traversal/GraphSONVersion.cs        | 11 ++-
 .../Process/Traversal/GraphTraversal.cs         | 45 ++++++----
 .../Process/Traversal/GraphTraversalSource.cs   | 14 ++-
 .../Process/Traversal/GryoVersion.cs            |  9 +-
 .../Process/Traversal/IBiFunction.cs            | 33 +++++++
 .../Process/Traversal/IBinaryOperator.cs        | 34 ++++++++
 .../Process/Traversal/IComparator.cs            | 32 +++++++
 .../Gremlin.Net/Process/Traversal/IConsumer.cs  | 33 +++++++
 .../Gremlin.Net/Process/Traversal/IFunction.cs  | 32 +++++++
 .../Gremlin.Net/Process/Traversal/IPredicate.cs | 32 +++++++
 .../Process/Traversal/NamingConversions.cs      | 91 --------------------
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 29 ++++---
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 21 +++--
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    | 13 ++-
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  | 11 ++-
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 15 ++--
 .../Process/Traversal/TraversalPredicate.cs     |  2 +-
 .../src/Gremlin.Net/Process/Traversal/__.cs     | 28 +++---
 .../Structure/IO/GraphSON/EnumSerializer.cs     |  5 +-
 .../Structure/IO/GraphSON/GraphSONWriter.cs     |  2 +-
 .../TraversalEnumParameter.cs                   |  5 +-
 32 files changed, 457 insertions(+), 213 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/50493397/CHANGELOG.asciidoc
----------------------------------------------------------------------


[08/20] tinkerpop git commit: TINKERPOP-1901 Use spaces to indent enum values

Posted by fl...@apache.org.
TINKERPOP-1901 Use spaces to indent enum values

Previously, the first enum value used spaces, whereas all following
values used tabs. Now, spaces are used consistently.


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

Branch: refs/heads/tp32
Commit: 4d5768b0aa53e06e95738f3faf904d3290a91794
Parents: d012171
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Mon Mar 12 16:37:30 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Mon Mar 12 16:37:30 2018 +0100

----------------------------------------------------------------------
 gremlin-dotnet/glv/Enum.template                |  4 ++--
 gremlin-dotnet/glv/generate.groovy              |  2 +-
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  2 +-
 .../Process/Traversal/Cardinality.cs            |  8 +++----
 .../src/Gremlin.Net/Process/Traversal/Column.cs |  6 ++---
 .../Gremlin.Net/Process/Traversal/Direction.cs  |  8 +++----
 .../Process/Traversal/GraphSONVersion.cs        |  6 ++---
 .../Process/Traversal/GryoVersion.cs            |  2 +-
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 24 ++++++++++----------
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 16 ++++++-------
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   |  6 ++---
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    |  8 +++----
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  |  6 ++---
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 10 ++++----
 14 files changed, 54 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/glv/Enum.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Enum.template b/gremlin-dotnet/glv/Enum.template
index 0be23c7..1f11076 100644
--- a/gremlin-dotnet/glv/Enum.template
+++ b/gremlin-dotnet/glv/Enum.template
@@ -32,8 +32,8 @@ namespace Gremlin.Net.Process.Traversal
             : base("<%= enumClass.simpleName %>", enumValue)
         {            
         }
-
-        <%= constants %>
+<% constants.each { constant -> %> 
+        <%= constant %><%}%>
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 6d89b2f..0404307 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -354,7 +354,7 @@ def createEnum = { enumClass ->
                     collect { value ->
                         def csharpName = toCSharpName(enumClass, value.name())
                         return "public static ${enumClass.simpleName} ${csharpName} => new ${enumClass.simpleName}(\"${value.name()}\");"
-                    }.join("\n\t\t")]
+                    }]
 
     def enumTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/Enum.template")).make(b)
     def enumFile = new File("${projectBaseDir}/src/Gremlin.Net/Process/Traversal/" + enumClass.getSimpleName() + ".cs")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
index 0ae4fa2..df6d349 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
@@ -32,7 +32,7 @@ namespace Gremlin.Net.Process.Traversal
             : base("Barrier", enumValue)
         {            
         }
-
+ 
         public static Barrier NormSack => new Barrier("normSack");
     }
     

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
index f158153..d2cbcf2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
@@ -32,10 +32,10 @@ namespace Gremlin.Net.Process.Traversal
             : base("Cardinality", enumValue)
         {            
         }
-
-        public static Cardinality List => new Cardinality("list");
-		public static Cardinality Set => new Cardinality("set");
-		public static Cardinality Single => new Cardinality("single");
+ 
+        public static Cardinality List => new Cardinality("list"); 
+        public static Cardinality Set => new Cardinality("set"); 
+        public static Cardinality Single => new Cardinality("single");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
index 9fa2039..9e0451e 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("Column", enumValue)
         {            
         }
-
-        public static Column Keys => new Column("keys");
-		public static Column Values => new Column("values");
+ 
+        public static Column Keys => new Column("keys"); 
+        public static Column Values => new Column("values");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
index 9566d51..5a93f0a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
@@ -32,10 +32,10 @@ namespace Gremlin.Net.Process.Traversal
             : base("Direction", enumValue)
         {            
         }
-
-        public static Direction Both => new Direction("BOTH");
-		public static Direction In => new Direction("IN");
-		public static Direction Out => new Direction("OUT");
+ 
+        public static Direction Both => new Direction("BOTH"); 
+        public static Direction In => new Direction("IN"); 
+        public static Direction Out => new Direction("OUT");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
index ad73ad1..0c92607 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("GraphSONVersion", enumValue)
         {            
         }
-
-        public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0");
-		public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
+ 
+        public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0"); 
+        public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
index 45387e2..fcc746e 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
@@ -32,7 +32,7 @@ namespace Gremlin.Net.Process.Traversal
             : base("GryoVersion", enumValue)
         {            
         }
-
+ 
         public static GryoVersion V1_0 => new GryoVersion("V1_0");
     }
     

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
index 4116197..8f0c9b3 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
@@ -32,18 +32,18 @@ namespace Gremlin.Net.Process.Traversal
             : base("Operator", enumValue)
         {            
         }
-
-        public static Operator AddAll => new Operator("addAll");
-		public static Operator And => new Operator("and");
-		public static Operator Assign => new Operator("assign");
-		public static Operator Div => new Operator("div");
-		public static Operator Max => new Operator("max");
-		public static Operator Min => new Operator("min");
-		public static Operator Minus => new Operator("minus");
-		public static Operator Mult => new Operator("mult");
-		public static Operator Or => new Operator("or");
-		public static Operator Sum => new Operator("sum");
-		public static Operator SumLong => new Operator("sumLong");
+ 
+        public static Operator AddAll => new Operator("addAll"); 
+        public static Operator And => new Operator("and"); 
+        public static Operator Assign => new Operator("assign"); 
+        public static Operator Div => new Operator("div"); 
+        public static Operator Max => new Operator("max"); 
+        public static Operator Min => new Operator("min"); 
+        public static Operator Minus => new Operator("minus"); 
+        public static Operator Mult => new Operator("mult"); 
+        public static Operator Or => new Operator("or"); 
+        public static Operator Sum => new Operator("sum"); 
+        public static Operator SumLong => new Operator("sumLong");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index d20906a..44ccb9b 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@ -32,14 +32,14 @@ namespace Gremlin.Net.Process.Traversal
             : base("Order", enumValue)
         {            
         }
-
-        public static Order Decr => new Order("decr");
-		public static Order Incr => new Order("incr");
-		public static Order KeyDecr => new Order("keyDecr");
-		public static Order KeyIncr => new Order("keyIncr");
-		public static Order Shuffle => new Order("shuffle");
-		public static Order ValueDecr => new Order("valueDecr");
-		public static Order ValueIncr => new Order("valueIncr");
+ 
+        public static Order Decr => new Order("decr"); 
+        public static Order Incr => new Order("incr"); 
+        public static Order KeyDecr => new Order("keyDecr"); 
+        public static Order KeyIncr => new Order("keyIncr"); 
+        public static Order Shuffle => new Order("shuffle"); 
+        public static Order ValueDecr => new Order("valueDecr"); 
+        public static Order ValueIncr => new Order("valueIncr");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
index a47d4a6..d4132ea 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("Pick", enumValue)
         {            
         }
-
-        public static Pick Any => new Pick("any");
-		public static Pick None => new Pick("none");
+ 
+        public static Pick Any => new Pick("any"); 
+        public static Pick None => new Pick("none");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
index 9e97a09..8a157c5 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
@@ -32,10 +32,10 @@ namespace Gremlin.Net.Process.Traversal
             : base("Pop", enumValue)
         {            
         }
-
-        public static Pop All => new Pop("all");
-		public static Pop First => new Pop("first");
-		public static Pop Last => new Pop("last");
+ 
+        public static Pop All => new Pop("all"); 
+        public static Pop First => new Pop("first"); 
+        public static Pop Last => new Pop("last");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
index 65a6e67..ee67c39 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("Scope", enumValue)
         {            
         }
-
-        public static Scope Global => new Scope("global");
-		public static Scope Local => new Scope("local");
+ 
+        public static Scope Global => new Scope("global"); 
+        public static Scope Local => new Scope("local");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
index c0e5927..bae1314 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
@@ -32,11 +32,11 @@ namespace Gremlin.Net.Process.Traversal
             : base("T", enumValue)
         {            
         }
-
-        public static T Id => new T("id");
-		public static T Key => new T("key");
-		public static T Label => new T("label");
-		public static T Value => new T("value");
+ 
+        public static T Id => new T("id"); 
+        public static T Key => new T("key"); 
+        public static T Label => new T("label"); 
+        public static T Value => new T("value");
     }
     
 #pragma warning restore 1591


[06/20] tinkerpop git commit: TINKERPOP-1901 Add interfaces for tokens in Gremlin.Net

Posted by fl...@apache.org.
TINKERPOP-1901 Add interfaces for tokens in Gremlin.Net

These interfaces simply represent their Java counterparts which allows
to use them as arguments in Gremlin steps.


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

Branch: refs/heads/tp33
Commit: d012171e97d5d87108eef3d0257a8b859f77de04
Parents: dcf3da3
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sat Mar 10 19:21:46 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sat Mar 10 19:21:46 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 gremlin-dotnet/glv/Enum.template                |  2 +-
 gremlin-dotnet/glv/generate.groovy              | 20 ++++++---
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  2 +-
 .../src/Gremlin.Net/Process/Traversal/Column.cs |  2 +-
 .../Process/Traversal/GraphTraversal.cs         | 45 ++++++++++++--------
 .../Process/Traversal/GraphTraversalSource.cs   | 14 ++++--
 .../Process/Traversal/IBiFunction.cs            | 33 ++++++++++++++
 .../Process/Traversal/IBinaryOperator.cs        | 34 +++++++++++++++
 .../Process/Traversal/IComparator.cs            | 32 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/IConsumer.cs  | 33 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/IFunction.cs  | 32 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/IPredicate.cs | 32 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/Operator.cs   |  2 +-
 .../src/Gremlin.Net/Process/Traversal/Order.cs  |  2 +-
 .../src/Gremlin.Net/Process/Traversal/T.cs      |  2 +-
 .../Process/Traversal/TraversalPredicate.cs     |  2 +-
 .../src/Gremlin.Net/Process/Traversal/__.cs     | 28 ++++++------
 18 files changed, 270 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 341a392..568097c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-8]]
 === TinkerPop 3.2.8 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Enums are now represented as classes in Gremlin.Net which allows to use them as arguments in more steps.
 * Bumped to Groovy 2.4.14.
 * Added `checkAdjacentVertices` option to `SubgraphStrategy`.
 * Modified `GremlinDslProcessor` so that it generated the `getAnonymousTraversalClass()` method to return the DSL version of `__`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/glv/Enum.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Enum.template b/gremlin-dotnet/glv/Enum.template
index fd09312..0be23c7 100644
--- a/gremlin-dotnet/glv/Enum.template
+++ b/gremlin-dotnet/glv/Enum.template
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class <%= enumClass.simpleName %> : EnumWrapper
+    public class <%= enumClass.simpleName %> : <%= implementedTypes %>
     {
         private <%= enumClass.simpleName %>(string enumValue)
             : base("<%= enumClass.simpleName %>", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 7894793..6d89b2f 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -48,17 +48,17 @@ def toCSharpTypeMap = ["Long": "long",
                        "TraversalMetrics": "E2",
                        "Traversal": "ITraversal",
                        "Traversal[]": "ITraversal[]",
-                       "Predicate": "TraversalPredicate",
+                       "Predicate": "IPredicate",
                        "P": "TraversalPredicate",
                        "TraversalStrategy": "ITraversalStrategy",
                        "TraversalStrategy[]": "ITraversalStrategy[]",
-                       "Function": "object",
-                       "BiFunction": "object",
+                       "Function": "IFunction",
+                       "BiFunction": "IBiFunction",
                        "UnaryOperator": "object",
-                       "BinaryOperator": "object",
-                       "Consumer": "object",
+                       "BinaryOperator": "IBinaryOperator",
+                       "Consumer": "IConsumer",
                        "Supplier": "object",
-                       "Comparator": "object",
+                       "Comparator": "IComparator",
                        "VertexProgram": "object"]
 
 def useE2 = ["E2", "E2"];
@@ -341,6 +341,14 @@ def toCSharpName = { enumClass, itemName ->
 
 def createEnum = { enumClass ->
     def b = ["enumClass": enumClass,
+             "implementedTypes": enumClass.getInterfaces().
+                    collect { it.getSimpleName() }.
+                    findAll { toCSharpTypeMap.containsKey(it) }.
+                    findAll { toCSharpTypeMap[it] != "object" }.
+                    sort { a, b -> a <=> b }.
+                    collect(["EnumWrapper"]) { typeName ->
+                        return toCSharpTypeMap[typeName]
+                    }.join(", "),
              "constants": enumClass.getEnumConstants().
                     sort { a, b -> a.name() <=> b.name() }.
                     collect { value ->

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
index 6c00f99..0ae4fa2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Barrier : EnumWrapper
+    public class Barrier : EnumWrapper, IConsumer
     {
         private Barrier(string enumValue)
             : base("Barrier", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
index 3daaa4d..9fa2039 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Column : EnumWrapper
+    public class Column : EnumWrapper, IFunction
     {
         private Column(string enumValue)
             : base("Column", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/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 d8e26ad..7100ea3 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -187,7 +187,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the barrier step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Barrier (object barrierConsumer)
+        public GraphTraversal<S, E> Barrier (IConsumer barrierConsumer)
         {
             Bytecode.AddStep("barrier", barrierConsumer);
             return Wrap<S, E>(this);
@@ -236,7 +236,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the branch step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E2> Branch<E2> (object function)
+        public GraphTraversal<S, E2> Branch<E2> (IFunction function)
         {
             Bytecode.AddStep("branch", function);
             return Wrap<S, E2>(this);
@@ -263,7 +263,7 @@ 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 (IComparator comparator)
         {
             Bytecode.AddStep("by", comparator);
             return Wrap<S, E>(this);
@@ -272,7 +272,16 @@ 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 (IFunction function)
+        {
+            Bytecode.AddStep("by", function);
+            return Wrap<S, E>(this);
+        }
+
+        /// <summary>
+        ///     Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
+        /// </summary>
+        public GraphTraversal<S, E> By (IFunction function, IComparator comparator)
         {
             Bytecode.AddStep("by", function, comparator);
             return Wrap<S, E>(this);
@@ -299,7 +308,7 @@ 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 (string key, IComparator comparator)
         {
             Bytecode.AddStep("by", key, comparator);
             return Wrap<S, E>(this);
@@ -326,7 +335,7 @@ 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 (ITraversal traversal, IComparator comparator)
         {
             Bytecode.AddStep("by", traversal, comparator);
             return Wrap<S, E>(this);
@@ -346,7 +355,7 @@ 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> (IFunction choiceFunction)
         {
             Bytecode.AddStep("choose", choiceFunction);
             return Wrap<S, E2>(this);
@@ -355,7 +364,7 @@ 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> (IPredicate choosePredicate, ITraversal trueChoice)
         {
             Bytecode.AddStep("choose", choosePredicate, trueChoice);
             return Wrap<S, E2>(this);
@@ -364,7 +373,7 @@ 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> (IPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
         {
             Bytecode.AddStep("choose", choosePredicate, trueChoice, falseChoice);
             return Wrap<S, E2>(this);
@@ -496,7 +505,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the emit step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Emit (TraversalPredicate emitPredicate)
+        public GraphTraversal<S, E> Emit (IPredicate emitPredicate)
         {
             Bytecode.AddStep("emit", emitPredicate);
             return Wrap<S, E>(this);
@@ -514,7 +523,7 @@ 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 (IPredicate predicate)
         {
             Bytecode.AddStep("filter", predicate);
             return Wrap<S, E>(this);
@@ -532,7 +541,7 @@ 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> (IFunction function)
         {
             Bytecode.AddStep("flatMap", function);
             return Wrap<S, E2>(this);
@@ -559,7 +568,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the fold step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E2> Fold<E2> (E2 seed, object foldFunction)
+        public GraphTraversal<S, E2> Fold<E2> (E2 seed, IBiFunction foldFunction)
         {
             Bytecode.AddStep("fold", seed, foldFunction);
             return Wrap<S, E2>(this);
@@ -942,7 +951,7 @@ 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> (IFunction function)
         {
             Bytecode.AddStep("map", function);
             return Wrap<S, E2>(this);
@@ -1302,7 +1311,7 @@ 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)
+        public GraphTraversal<S, E> Sack (IBiFunction sackOperator)
         {
             Bytecode.AddStep("sack", sackOperator);
             return Wrap<S, E>(this);
@@ -1311,7 +1320,7 @@ 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, E> Sack (IBiFunction sackOperator, string elementPropertyKey)
         {
             Bytecode.AddStep("sack", sackOperator, elementPropertyKey);
             return Wrap<S, E>(this);
@@ -1387,7 +1396,7 @@ 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 (IConsumer consumer)
         {
             Bytecode.AddStep("sideEffect", consumer);
             return Wrap<S, E>(this);
@@ -1591,7 +1600,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the until step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Until (TraversalPredicate untilPredicate)
+        public GraphTraversal<S, E> Until (IPredicate untilPredicate)
         {
             Bytecode.AddStep("until", untilPredicate);
             return Wrap<S, E>(this);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/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 2cbe4de..9c32559 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
@@ -96,7 +96,7 @@ namespace Gremlin.Net.Process.Traversal
             return source;
         }
 
-        public GraphTraversalSource WithSack(object initialValue, object mergeOperator)
+        public GraphTraversalSource WithSack(object initialValue, IBinaryOperator mergeOperator)
         {
             var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
@@ -104,7 +104,15 @@ 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));
+            source.Bytecode.AddSource("withSack", initialValue, splitOperator);
+            return source;
+        }
+
+        public GraphTraversalSource WithSack(object initialValue, object splitOperator, IBinaryOperator mergeOperator)
         {
             var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
@@ -120,7 +128,7 @@ namespace Gremlin.Net.Process.Traversal
             return source;
         }
 
-        public GraphTraversalSource WithSideEffect(string key, object initialValue, object reducer)
+        public GraphTraversalSource WithSideEffect(string key, object initialValue, IBinaryOperator reducer)
         {
             var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs
new file mode 100644
index 0000000..15c9f91
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs
@@ -0,0 +1,33 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents a function that accepts two arguments and produces a result. This is the two-arity specialization of
+    ///     <see cref="IFunction"/>.
+    /// </summary>
+    public interface IBiFunction
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs
new file mode 100644
index 0000000..dcd7aed
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs
@@ -0,0 +1,34 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents an operation upon two operands of the same type, producing a result of the same type as the operands.
+    ///     This is a specialization of <see cref="IBiFunction" /> for the case where the operands and the result are all of
+    ///     the same type.
+    /// </summary>
+    public interface IBinaryOperator : IBiFunction
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs
new file mode 100644
index 0000000..b7a48e0
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs
@@ -0,0 +1,32 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     A comparison function, which imposes a total ordering on some collection of objects.
+    /// </summary>
+    public interface IComparator
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs
new file mode 100644
index 0000000..7eed5e2
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs
@@ -0,0 +1,33 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents an operation that accepts a single input argument and returns no result. Unlike most other functional
+    ///     interfaces, Consumer is expected to operate via side-effects.
+    /// </summary>
+    public interface IConsumer
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs
new file mode 100644
index 0000000..075154a
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs
@@ -0,0 +1,32 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents a function that accepts one argument and produces a result. 
+    /// </summary>
+    public interface IFunction
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs
new file mode 100644
index 0000000..a7e5e3d
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs
@@ -0,0 +1,32 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents a predicate (boolean-valued function) of one argument. 
+    /// </summary>
+    public interface IPredicate
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
index 699a5a5..4116197 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Operator : EnumWrapper
+    public class Operator : EnumWrapper, IBinaryOperator
     {
         private Operator(string enumValue)
             : base("Operator", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index 93bf7bc..d20906a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Order : EnumWrapper
+    public class Order : EnumWrapper, IComparator
     {
         private Order(string enumValue)
             : base("Order", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
index 9eba458..c0e5927 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class T : EnumWrapper
+    public class T : EnumWrapper, IFunction
     {
         private T(string enumValue)
             : base("T", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
index b854213..e8b5be8 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
     /// <summary>
     ///     Represents a predicate (boolean-valued function) used in a <see cref="ITraversal" />.
     /// </summary>
-    public class TraversalPredicate
+    public class TraversalPredicate : IPredicate
     {
         /// <summary>
         ///     Initializes a new instance of the <see cref="TraversalPredicate" /> class.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
index 1788bad..9620e7f 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
@@ -153,7 +153,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the barrier step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Barrier(object barrierConsumer)
+        public static GraphTraversal<object, object> Barrier(IConsumer barrierConsumer)
         {
             return new GraphTraversal<object, object>().Barrier(barrierConsumer);            
         }
@@ -197,7 +197,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the branch step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Branch<E2>(object function)
+        public static GraphTraversal<object, E2> Branch<E2>(IFunction function)
         {
             return new GraphTraversal<object, E2>().Branch<E2>(function);            
         }
@@ -223,7 +223,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the choose step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Choose<E2>(object choiceFunction)
+        public static GraphTraversal<object, E2> Choose<E2>(IFunction choiceFunction)
         {
             return new GraphTraversal<object, E2>().Choose<E2>(choiceFunction);            
         }
@@ -231,7 +231,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the choose step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Choose<E2>(TraversalPredicate choosePredicate, ITraversal trueChoice)
+        public static GraphTraversal<object, E2> Choose<E2>(IPredicate choosePredicate, ITraversal trueChoice)
         {
             return new GraphTraversal<object, E2>().Choose<E2>(choosePredicate, trueChoice);            
         }
@@ -239,7 +239,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the choose step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Choose<E2>(TraversalPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
+        public static GraphTraversal<object, E2> Choose<E2>(IPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
         {
             return new GraphTraversal<object, E2>().Choose<E2>(choosePredicate, trueChoice, falseChoice);            
         }
@@ -357,7 +357,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the emit step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Emit(TraversalPredicate emitPredicate)
+        public static GraphTraversal<object, object> Emit(IPredicate emitPredicate)
         {
             return new GraphTraversal<object, object>().Emit(emitPredicate);            
         }
@@ -373,7 +373,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the filter step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Filter(TraversalPredicate predicate)
+        public static GraphTraversal<object, object> Filter(IPredicate predicate)
         {
             return new GraphTraversal<object, object>().Filter(predicate);            
         }
@@ -389,7 +389,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the flatMap step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> FlatMap<E2>(object function)
+        public static GraphTraversal<object, E2> FlatMap<E2>(IFunction function)
         {
             return new GraphTraversal<object, E2>().FlatMap<E2>(function);            
         }
@@ -413,7 +413,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the fold step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Fold<E2>(E2 seed, object foldFunction)
+        public static GraphTraversal<object, E2> Fold<E2>(E2 seed, IBiFunction foldFunction)
         {
             return new GraphTraversal<object, E2>().Fold<E2>(seed, foldFunction);            
         }
@@ -739,7 +739,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the map step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Map<E2>(object function)
+        public static GraphTraversal<object, E2> Map<E2>(IFunction function)
         {
             return new GraphTraversal<object, E2>().Map<E2>(function);            
         }
@@ -997,7 +997,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the sack step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Sack(object sackOperator)
+        public static GraphTraversal<object, object> Sack(IBiFunction sackOperator)
         {
             return new GraphTraversal<object, object>().Sack(sackOperator);            
         }
@@ -1005,7 +1005,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the sack step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Sack(object sackOperator, string elementPropertyKey)
+        public static GraphTraversal<object, object> Sack(IBiFunction sackOperator, string elementPropertyKey)
         {
             return new GraphTraversal<object, object>().Sack(sackOperator, elementPropertyKey);            
         }
@@ -1073,7 +1073,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the sideEffect step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> SideEffect(object consumer)
+        public static GraphTraversal<object, object> SideEffect(IConsumer consumer)
         {
             return new GraphTraversal<object, object>().SideEffect(consumer);            
         }
@@ -1239,7 +1239,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the until step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Until(TraversalPredicate untilPredicate)
+        public static GraphTraversal<object, object> Until(IPredicate untilPredicate)
         {
             return new GraphTraversal<object, object>().Until(untilPredicate);            
         }


[05/20] tinkerpop git commit: TINKERPOP-1901 Add interfaces for tokens in Gremlin.Net

Posted by fl...@apache.org.
TINKERPOP-1901 Add interfaces for tokens in Gremlin.Net

These interfaces simply represent their Java counterparts which allows
to use them as arguments in Gremlin steps.


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

Branch: refs/heads/master
Commit: d012171e97d5d87108eef3d0257a8b859f77de04
Parents: dcf3da3
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Sat Mar 10 19:21:46 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Sat Mar 10 19:21:46 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 gremlin-dotnet/glv/Enum.template                |  2 +-
 gremlin-dotnet/glv/generate.groovy              | 20 ++++++---
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  2 +-
 .../src/Gremlin.Net/Process/Traversal/Column.cs |  2 +-
 .../Process/Traversal/GraphTraversal.cs         | 45 ++++++++++++--------
 .../Process/Traversal/GraphTraversalSource.cs   | 14 ++++--
 .../Process/Traversal/IBiFunction.cs            | 33 ++++++++++++++
 .../Process/Traversal/IBinaryOperator.cs        | 34 +++++++++++++++
 .../Process/Traversal/IComparator.cs            | 32 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/IConsumer.cs  | 33 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/IFunction.cs  | 32 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/IPredicate.cs | 32 ++++++++++++++
 .../Gremlin.Net/Process/Traversal/Operator.cs   |  2 +-
 .../src/Gremlin.Net/Process/Traversal/Order.cs  |  2 +-
 .../src/Gremlin.Net/Process/Traversal/T.cs      |  2 +-
 .../Process/Traversal/TraversalPredicate.cs     |  2 +-
 .../src/Gremlin.Net/Process/Traversal/__.cs     | 28 ++++++------
 18 files changed, 270 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 341a392..568097c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 [[release-3-2-8]]
 === TinkerPop 3.2.8 (Release Date: NOT OFFICIALLY RELEASED YET)
 
+* Enums are now represented as classes in Gremlin.Net which allows to use them as arguments in more steps.
 * Bumped to Groovy 2.4.14.
 * Added `checkAdjacentVertices` option to `SubgraphStrategy`.
 * Modified `GremlinDslProcessor` so that it generated the `getAnonymousTraversalClass()` method to return the DSL version of `__`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/glv/Enum.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Enum.template b/gremlin-dotnet/glv/Enum.template
index fd09312..0be23c7 100644
--- a/gremlin-dotnet/glv/Enum.template
+++ b/gremlin-dotnet/glv/Enum.template
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class <%= enumClass.simpleName %> : EnumWrapper
+    public class <%= enumClass.simpleName %> : <%= implementedTypes %>
     {
         private <%= enumClass.simpleName %>(string enumValue)
             : base("<%= enumClass.simpleName %>", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 7894793..6d89b2f 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -48,17 +48,17 @@ def toCSharpTypeMap = ["Long": "long",
                        "TraversalMetrics": "E2",
                        "Traversal": "ITraversal",
                        "Traversal[]": "ITraversal[]",
-                       "Predicate": "TraversalPredicate",
+                       "Predicate": "IPredicate",
                        "P": "TraversalPredicate",
                        "TraversalStrategy": "ITraversalStrategy",
                        "TraversalStrategy[]": "ITraversalStrategy[]",
-                       "Function": "object",
-                       "BiFunction": "object",
+                       "Function": "IFunction",
+                       "BiFunction": "IBiFunction",
                        "UnaryOperator": "object",
-                       "BinaryOperator": "object",
-                       "Consumer": "object",
+                       "BinaryOperator": "IBinaryOperator",
+                       "Consumer": "IConsumer",
                        "Supplier": "object",
-                       "Comparator": "object",
+                       "Comparator": "IComparator",
                        "VertexProgram": "object"]
 
 def useE2 = ["E2", "E2"];
@@ -341,6 +341,14 @@ def toCSharpName = { enumClass, itemName ->
 
 def createEnum = { enumClass ->
     def b = ["enumClass": enumClass,
+             "implementedTypes": enumClass.getInterfaces().
+                    collect { it.getSimpleName() }.
+                    findAll { toCSharpTypeMap.containsKey(it) }.
+                    findAll { toCSharpTypeMap[it] != "object" }.
+                    sort { a, b -> a <=> b }.
+                    collect(["EnumWrapper"]) { typeName ->
+                        return toCSharpTypeMap[typeName]
+                    }.join(", "),
              "constants": enumClass.getEnumConstants().
                     sort { a, b -> a.name() <=> b.name() }.
                     collect { value ->

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
index 6c00f99..0ae4fa2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Barrier : EnumWrapper
+    public class Barrier : EnumWrapper, IConsumer
     {
         private Barrier(string enumValue)
             : base("Barrier", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
index 3daaa4d..9fa2039 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Column : EnumWrapper
+    public class Column : EnumWrapper, IFunction
     {
         private Column(string enumValue)
             : base("Column", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/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 d8e26ad..7100ea3 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs
@@ -187,7 +187,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the barrier step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Barrier (object barrierConsumer)
+        public GraphTraversal<S, E> Barrier (IConsumer barrierConsumer)
         {
             Bytecode.AddStep("barrier", barrierConsumer);
             return Wrap<S, E>(this);
@@ -236,7 +236,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the branch step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E2> Branch<E2> (object function)
+        public GraphTraversal<S, E2> Branch<E2> (IFunction function)
         {
             Bytecode.AddStep("branch", function);
             return Wrap<S, E2>(this);
@@ -263,7 +263,7 @@ 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 (IComparator comparator)
         {
             Bytecode.AddStep("by", comparator);
             return Wrap<S, E>(this);
@@ -272,7 +272,16 @@ 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 (IFunction function)
+        {
+            Bytecode.AddStep("by", function);
+            return Wrap<S, E>(this);
+        }
+
+        /// <summary>
+        ///     Adds the by step to this <see cref="GraphTraversal{SType, EType}" />.
+        /// </summary>
+        public GraphTraversal<S, E> By (IFunction function, IComparator comparator)
         {
             Bytecode.AddStep("by", function, comparator);
             return Wrap<S, E>(this);
@@ -299,7 +308,7 @@ 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 (string key, IComparator comparator)
         {
             Bytecode.AddStep("by", key, comparator);
             return Wrap<S, E>(this);
@@ -326,7 +335,7 @@ 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 (ITraversal traversal, IComparator comparator)
         {
             Bytecode.AddStep("by", traversal, comparator);
             return Wrap<S, E>(this);
@@ -346,7 +355,7 @@ 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> (IFunction choiceFunction)
         {
             Bytecode.AddStep("choose", choiceFunction);
             return Wrap<S, E2>(this);
@@ -355,7 +364,7 @@ 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> (IPredicate choosePredicate, ITraversal trueChoice)
         {
             Bytecode.AddStep("choose", choosePredicate, trueChoice);
             return Wrap<S, E2>(this);
@@ -364,7 +373,7 @@ 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> (IPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
         {
             Bytecode.AddStep("choose", choosePredicate, trueChoice, falseChoice);
             return Wrap<S, E2>(this);
@@ -496,7 +505,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the emit step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Emit (TraversalPredicate emitPredicate)
+        public GraphTraversal<S, E> Emit (IPredicate emitPredicate)
         {
             Bytecode.AddStep("emit", emitPredicate);
             return Wrap<S, E>(this);
@@ -514,7 +523,7 @@ 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 (IPredicate predicate)
         {
             Bytecode.AddStep("filter", predicate);
             return Wrap<S, E>(this);
@@ -532,7 +541,7 @@ 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> (IFunction function)
         {
             Bytecode.AddStep("flatMap", function);
             return Wrap<S, E2>(this);
@@ -559,7 +568,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the fold step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E2> Fold<E2> (E2 seed, object foldFunction)
+        public GraphTraversal<S, E2> Fold<E2> (E2 seed, IBiFunction foldFunction)
         {
             Bytecode.AddStep("fold", seed, foldFunction);
             return Wrap<S, E2>(this);
@@ -942,7 +951,7 @@ 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> (IFunction function)
         {
             Bytecode.AddStep("map", function);
             return Wrap<S, E2>(this);
@@ -1302,7 +1311,7 @@ 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)
+        public GraphTraversal<S, E> Sack (IBiFunction sackOperator)
         {
             Bytecode.AddStep("sack", sackOperator);
             return Wrap<S, E>(this);
@@ -1311,7 +1320,7 @@ 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, E> Sack (IBiFunction sackOperator, string elementPropertyKey)
         {
             Bytecode.AddStep("sack", sackOperator, elementPropertyKey);
             return Wrap<S, E>(this);
@@ -1387,7 +1396,7 @@ 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 (IConsumer consumer)
         {
             Bytecode.AddStep("sideEffect", consumer);
             return Wrap<S, E>(this);
@@ -1591,7 +1600,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Adds the until step to this <see cref="GraphTraversal{SType, EType}" />.
         /// </summary>
-        public GraphTraversal<S, E> Until (TraversalPredicate untilPredicate)
+        public GraphTraversal<S, E> Until (IPredicate untilPredicate)
         {
             Bytecode.AddStep("until", untilPredicate);
             return Wrap<S, E>(this);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/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 2cbe4de..9c32559 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversalSource.cs
@@ -96,7 +96,7 @@ namespace Gremlin.Net.Process.Traversal
             return source;
         }
 
-        public GraphTraversalSource WithSack(object initialValue, object mergeOperator)
+        public GraphTraversalSource WithSack(object initialValue, IBinaryOperator mergeOperator)
         {
             var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
@@ -104,7 +104,15 @@ 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));
+            source.Bytecode.AddSource("withSack", initialValue, splitOperator);
+            return source;
+        }
+
+        public GraphTraversalSource WithSack(object initialValue, object splitOperator, IBinaryOperator mergeOperator)
         {
             var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));
@@ -120,7 +128,7 @@ namespace Gremlin.Net.Process.Traversal
             return source;
         }
 
-        public GraphTraversalSource WithSideEffect(string key, object initialValue, object reducer)
+        public GraphTraversalSource WithSideEffect(string key, object initialValue, IBinaryOperator reducer)
         {
             var source = new GraphTraversalSource(new List<ITraversalStrategy>(TraversalStrategies),
                                                   new Bytecode(Bytecode));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs
new file mode 100644
index 0000000..15c9f91
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBiFunction.cs
@@ -0,0 +1,33 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents a function that accepts two arguments and produces a result. This is the two-arity specialization of
+    ///     <see cref="IFunction"/>.
+    /// </summary>
+    public interface IBiFunction
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs
new file mode 100644
index 0000000..dcd7aed
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IBinaryOperator.cs
@@ -0,0 +1,34 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents an operation upon two operands of the same type, producing a result of the same type as the operands.
+    ///     This is a specialization of <see cref="IBiFunction" /> for the case where the operands and the result are all of
+    ///     the same type.
+    /// </summary>
+    public interface IBinaryOperator : IBiFunction
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs
new file mode 100644
index 0000000..b7a48e0
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IComparator.cs
@@ -0,0 +1,32 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     A comparison function, which imposes a total ordering on some collection of objects.
+    /// </summary>
+    public interface IComparator
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs
new file mode 100644
index 0000000..7eed5e2
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IConsumer.cs
@@ -0,0 +1,33 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents an operation that accepts a single input argument and returns no result. Unlike most other functional
+    ///     interfaces, Consumer is expected to operate via side-effects.
+    /// </summary>
+    public interface IConsumer
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs
new file mode 100644
index 0000000..075154a
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IFunction.cs
@@ -0,0 +1,32 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents a function that accepts one argument and produces a result. 
+    /// </summary>
+    public interface IFunction
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs
new file mode 100644
index 0000000..a7e5e3d
--- /dev/null
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/IPredicate.cs
@@ -0,0 +1,32 @@
+#region License
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#endregion
+
+namespace Gremlin.Net.Process.Traversal
+{
+    /// <summary>
+    ///     Represents a predicate (boolean-valued function) of one argument. 
+    /// </summary>
+    public interface IPredicate
+    {
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
index 699a5a5..4116197 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Operator : EnumWrapper
+    public class Operator : EnumWrapper, IBinaryOperator
     {
         private Operator(string enumValue)
             : base("Operator", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index 93bf7bc..d20906a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class Order : EnumWrapper
+    public class Order : EnumWrapper, IComparator
     {
         private Order(string enumValue)
             : base("Order", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
index 9eba458..c0e5927 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
 {
 #pragma warning disable 1591
 
-    public class T : EnumWrapper
+    public class T : EnumWrapper, IFunction
     {
         private T(string enumValue)
             : base("T", enumValue)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
index b854213..e8b5be8 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/TraversalPredicate.cs
@@ -26,7 +26,7 @@ namespace Gremlin.Net.Process.Traversal
     /// <summary>
     ///     Represents a predicate (boolean-valued function) used in a <see cref="ITraversal" />.
     /// </summary>
-    public class TraversalPredicate
+    public class TraversalPredicate : IPredicate
     {
         /// <summary>
         ///     Initializes a new instance of the <see cref="TraversalPredicate" /> class.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d012171e/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
index 1788bad..9620e7f 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/__.cs
@@ -153,7 +153,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the barrier step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Barrier(object barrierConsumer)
+        public static GraphTraversal<object, object> Barrier(IConsumer barrierConsumer)
         {
             return new GraphTraversal<object, object>().Barrier(barrierConsumer);            
         }
@@ -197,7 +197,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the branch step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Branch<E2>(object function)
+        public static GraphTraversal<object, E2> Branch<E2>(IFunction function)
         {
             return new GraphTraversal<object, E2>().Branch<E2>(function);            
         }
@@ -223,7 +223,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the choose step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Choose<E2>(object choiceFunction)
+        public static GraphTraversal<object, E2> Choose<E2>(IFunction choiceFunction)
         {
             return new GraphTraversal<object, E2>().Choose<E2>(choiceFunction);            
         }
@@ -231,7 +231,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the choose step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Choose<E2>(TraversalPredicate choosePredicate, ITraversal trueChoice)
+        public static GraphTraversal<object, E2> Choose<E2>(IPredicate choosePredicate, ITraversal trueChoice)
         {
             return new GraphTraversal<object, E2>().Choose<E2>(choosePredicate, trueChoice);            
         }
@@ -239,7 +239,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the choose step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Choose<E2>(TraversalPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
+        public static GraphTraversal<object, E2> Choose<E2>(IPredicate choosePredicate, ITraversal trueChoice, ITraversal falseChoice)
         {
             return new GraphTraversal<object, E2>().Choose<E2>(choosePredicate, trueChoice, falseChoice);            
         }
@@ -357,7 +357,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the emit step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Emit(TraversalPredicate emitPredicate)
+        public static GraphTraversal<object, object> Emit(IPredicate emitPredicate)
         {
             return new GraphTraversal<object, object>().Emit(emitPredicate);            
         }
@@ -373,7 +373,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the filter step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Filter(TraversalPredicate predicate)
+        public static GraphTraversal<object, object> Filter(IPredicate predicate)
         {
             return new GraphTraversal<object, object>().Filter(predicate);            
         }
@@ -389,7 +389,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the flatMap step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> FlatMap<E2>(object function)
+        public static GraphTraversal<object, E2> FlatMap<E2>(IFunction function)
         {
             return new GraphTraversal<object, E2>().FlatMap<E2>(function);            
         }
@@ -413,7 +413,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the fold step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Fold<E2>(E2 seed, object foldFunction)
+        public static GraphTraversal<object, E2> Fold<E2>(E2 seed, IBiFunction foldFunction)
         {
             return new GraphTraversal<object, E2>().Fold<E2>(seed, foldFunction);            
         }
@@ -739,7 +739,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the map step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, E2> Map<E2>(object function)
+        public static GraphTraversal<object, E2> Map<E2>(IFunction function)
         {
             return new GraphTraversal<object, E2>().Map<E2>(function);            
         }
@@ -997,7 +997,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the sack step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Sack(object sackOperator)
+        public static GraphTraversal<object, object> Sack(IBiFunction sackOperator)
         {
             return new GraphTraversal<object, object>().Sack(sackOperator);            
         }
@@ -1005,7 +1005,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the sack step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Sack(object sackOperator, string elementPropertyKey)
+        public static GraphTraversal<object, object> Sack(IBiFunction sackOperator, string elementPropertyKey)
         {
             return new GraphTraversal<object, object>().Sack(sackOperator, elementPropertyKey);            
         }
@@ -1073,7 +1073,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the sideEffect step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> SideEffect(object consumer)
+        public static GraphTraversal<object, object> SideEffect(IConsumer consumer)
         {
             return new GraphTraversal<object, object>().SideEffect(consumer);            
         }
@@ -1239,7 +1239,7 @@ namespace Gremlin.Net.Process.Traversal
         /// <summary>
         ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> and adds the until step to that traversal.
         /// </summary>
-        public static GraphTraversal<object, object> Until(TraversalPredicate untilPredicate)
+        public static GraphTraversal<object, object> Until(IPredicate untilPredicate)
         {
             return new GraphTraversal<object, object>().Until(untilPredicate);            
         }


[12/20] tinkerpop git commit: TINKERPOP-1901 Describe improved Gremlin.Net tokens in upgrade docs

Posted by fl...@apache.org.
TINKERPOP-1901 Describe improved Gremlin.Net tokens in upgrade docs


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

Branch: refs/heads/tp33
Commit: df989dc40ab7cf834b6ed275c453c4bb220315bf
Parents: 4d5768b
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 19:26:00 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 19:26:00 2018 +0100

----------------------------------------------------------------------
 docs/src/upgrade/release-3.2.x-incubating.asciidoc | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/df989dc4/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 7d2a80c..0cb8ddc 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -42,6 +42,17 @@ by clients that might mysteriously disappear without properly closing their conn
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1726[TINKERPOP-1726]
 
+==== Gremlin.Net Tokens Improved
+
+The various Gremlin tokens (e.g. `T`, `Order`, `Operator`, etc.) that were implemented as Enums before in Gremlin.Net
+are now implemented as classes. This mainly allows them to implement interfaces which their Java counterparts already
+did. `T` for example now implements the new interface `IFunction` which simply mirrors its Java counterpart `Function`.
+Steps that expect objects for those interfaces as arguments now explicitly use the interface. Before, they used just
+`object` as the type for these arguments which made it hard for users to know what kind of `object` they can use.
+However, usage of these tokens themselves shouldn't change at all (e.g. `T.Id` is still `T.Id`).
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1901[TINKERPOP-1901]
+
 === Upgrading for Providers
 
 ==== Graph System Providers


[18/20] tinkerpop git commit: Ignore one more test due to T deserialization problem CTR

Posted by fl...@apache.org.
Ignore one more test due to T deserialization problem CTR


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

Branch: refs/heads/master
Commit: c22ab901ea391116cf906b7af37379429a1336af
Parents: 8cf71ae
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 21:27:51 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 21:27:51 2018 +0100

----------------------------------------------------------------------
 .../test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs   | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c22ab901/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index bc82043..28723c9 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -42,6 +42,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
             {
                 { "g_V_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported },   // TINKERPOP-1866
                 { "g_V_valueMapXtrue_name_ageX", IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866
+                { "g_V_hasLabelXpersonX_filterXoutEXcreatedXX_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported }, // TINKERPOP-1866
                 {"g_V_hasIdXwithinXemptyXX_count", IgnoreReason.PWithinWrapsArgumentsInArray},
                 {"g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.PWithinWrapsArgumentsInArray},
                 {


[10/20] tinkerpop git commit: TINKERPOP-1901 Describe improved Gremlin.Net tokens in upgrade docs

Posted by fl...@apache.org.
TINKERPOP-1901 Describe improved Gremlin.Net tokens in upgrade docs


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

Branch: refs/heads/master
Commit: df989dc40ab7cf834b6ed275c453c4bb220315bf
Parents: 4d5768b
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Tue Mar 13 19:26:00 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Tue Mar 13 19:26:00 2018 +0100

----------------------------------------------------------------------
 docs/src/upgrade/release-3.2.x-incubating.asciidoc | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/df989dc4/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 7d2a80c..0cb8ddc 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -42,6 +42,17 @@ by clients that might mysteriously disappear without properly closing their conn
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1726[TINKERPOP-1726]
 
+==== Gremlin.Net Tokens Improved
+
+The various Gremlin tokens (e.g. `T`, `Order`, `Operator`, etc.) that were implemented as Enums before in Gremlin.Net
+are now implemented as classes. This mainly allows them to implement interfaces which their Java counterparts already
+did. `T` for example now implements the new interface `IFunction` which simply mirrors its Java counterpart `Function`.
+Steps that expect objects for those interfaces as arguments now explicitly use the interface. Before, they used just
+`object` as the type for these arguments which made it hard for users to know what kind of `object` they can use.
+However, usage of these tokens themselves shouldn't change at all (e.g. `T.Id` is still `T.Id`).
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1901[TINKERPOP-1901]
+
 === Upgrading for Providers
 
 ==== Graph System Providers


[09/20] tinkerpop git commit: TINKERPOP-1901 Use spaces to indent enum values

Posted by fl...@apache.org.
TINKERPOP-1901 Use spaces to indent enum values

Previously, the first enum value used spaces, whereas all following
values used tabs. Now, spaces are used consistently.


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

Branch: refs/heads/tp33
Commit: 4d5768b0aa53e06e95738f3faf904d3290a91794
Parents: d012171
Author: Florian Hockmann <fh...@florian-hockmann.de>
Authored: Mon Mar 12 16:37:30 2018 +0100
Committer: Florian Hockmann <fh...@florian-hockmann.de>
Committed: Mon Mar 12 16:37:30 2018 +0100

----------------------------------------------------------------------
 gremlin-dotnet/glv/Enum.template                |  4 ++--
 gremlin-dotnet/glv/generate.groovy              |  2 +-
 .../Gremlin.Net/Process/Traversal/Barrier.cs    |  2 +-
 .../Process/Traversal/Cardinality.cs            |  8 +++----
 .../src/Gremlin.Net/Process/Traversal/Column.cs |  6 ++---
 .../Gremlin.Net/Process/Traversal/Direction.cs  |  8 +++----
 .../Process/Traversal/GraphSONVersion.cs        |  6 ++---
 .../Process/Traversal/GryoVersion.cs            |  2 +-
 .../Gremlin.Net/Process/Traversal/Operator.cs   | 24 ++++++++++----------
 .../src/Gremlin.Net/Process/Traversal/Order.cs  | 16 ++++++-------
 .../src/Gremlin.Net/Process/Traversal/Pick.cs   |  6 ++---
 .../src/Gremlin.Net/Process/Traversal/Pop.cs    |  8 +++----
 .../src/Gremlin.Net/Process/Traversal/Scope.cs  |  6 ++---
 .../src/Gremlin.Net/Process/Traversal/T.cs      | 10 ++++----
 14 files changed, 54 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/glv/Enum.template
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/Enum.template b/gremlin-dotnet/glv/Enum.template
index 0be23c7..1f11076 100644
--- a/gremlin-dotnet/glv/Enum.template
+++ b/gremlin-dotnet/glv/Enum.template
@@ -32,8 +32,8 @@ namespace Gremlin.Net.Process.Traversal
             : base("<%= enumClass.simpleName %>", enumValue)
         {            
         }
-
-        <%= constants %>
+<% constants.each { constant -> %> 
+        <%= constant %><%}%>
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/glv/generate.groovy
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 6d89b2f..0404307 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -354,7 +354,7 @@ def createEnum = { enumClass ->
                     collect { value ->
                         def csharpName = toCSharpName(enumClass, value.name())
                         return "public static ${enumClass.simpleName} ${csharpName} => new ${enumClass.simpleName}(\"${value.name()}\");"
-                    }.join("\n\t\t")]
+                    }]
 
     def enumTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/Enum.template")).make(b)
     def enumFile = new File("${projectBaseDir}/src/Gremlin.Net/Process/Traversal/" + enumClass.getSimpleName() + ".cs")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
index 0ae4fa2..df6d349 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Barrier.cs
@@ -32,7 +32,7 @@ namespace Gremlin.Net.Process.Traversal
             : base("Barrier", enumValue)
         {            
         }
-
+ 
         public static Barrier NormSack => new Barrier("normSack");
     }
     

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
index f158153..d2cbcf2 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Cardinality.cs
@@ -32,10 +32,10 @@ namespace Gremlin.Net.Process.Traversal
             : base("Cardinality", enumValue)
         {            
         }
-
-        public static Cardinality List => new Cardinality("list");
-		public static Cardinality Set => new Cardinality("set");
-		public static Cardinality Single => new Cardinality("single");
+ 
+        public static Cardinality List => new Cardinality("list"); 
+        public static Cardinality Set => new Cardinality("set"); 
+        public static Cardinality Single => new Cardinality("single");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
index 9fa2039..9e0451e 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Column.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("Column", enumValue)
         {            
         }
-
-        public static Column Keys => new Column("keys");
-		public static Column Values => new Column("values");
+ 
+        public static Column Keys => new Column("keys"); 
+        public static Column Values => new Column("values");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
index 9566d51..5a93f0a 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Direction.cs
@@ -32,10 +32,10 @@ namespace Gremlin.Net.Process.Traversal
             : base("Direction", enumValue)
         {            
         }
-
-        public static Direction Both => new Direction("BOTH");
-		public static Direction In => new Direction("IN");
-		public static Direction Out => new Direction("OUT");
+ 
+        public static Direction Both => new Direction("BOTH"); 
+        public static Direction In => new Direction("IN"); 
+        public static Direction Out => new Direction("OUT");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
index ad73ad1..0c92607 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphSONVersion.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("GraphSONVersion", enumValue)
         {            
         }
-
-        public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0");
-		public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
+ 
+        public static GraphSONVersion V1_0 => new GraphSONVersion("V1_0"); 
+        public static GraphSONVersion V2_0 => new GraphSONVersion("V2_0");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
index 45387e2..fcc746e 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GryoVersion.cs
@@ -32,7 +32,7 @@ namespace Gremlin.Net.Process.Traversal
             : base("GryoVersion", enumValue)
         {            
         }
-
+ 
         public static GryoVersion V1_0 => new GryoVersion("V1_0");
     }
     

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
index 4116197..8f0c9b3 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Operator.cs
@@ -32,18 +32,18 @@ namespace Gremlin.Net.Process.Traversal
             : base("Operator", enumValue)
         {            
         }
-
-        public static Operator AddAll => new Operator("addAll");
-		public static Operator And => new Operator("and");
-		public static Operator Assign => new Operator("assign");
-		public static Operator Div => new Operator("div");
-		public static Operator Max => new Operator("max");
-		public static Operator Min => new Operator("min");
-		public static Operator Minus => new Operator("minus");
-		public static Operator Mult => new Operator("mult");
-		public static Operator Or => new Operator("or");
-		public static Operator Sum => new Operator("sum");
-		public static Operator SumLong => new Operator("sumLong");
+ 
+        public static Operator AddAll => new Operator("addAll"); 
+        public static Operator And => new Operator("and"); 
+        public static Operator Assign => new Operator("assign"); 
+        public static Operator Div => new Operator("div"); 
+        public static Operator Max => new Operator("max"); 
+        public static Operator Min => new Operator("min"); 
+        public static Operator Minus => new Operator("minus"); 
+        public static Operator Mult => new Operator("mult"); 
+        public static Operator Or => new Operator("or"); 
+        public static Operator Sum => new Operator("sum"); 
+        public static Operator SumLong => new Operator("sumLong");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
index d20906a..44ccb9b 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Order.cs
@@ -32,14 +32,14 @@ namespace Gremlin.Net.Process.Traversal
             : base("Order", enumValue)
         {            
         }
-
-        public static Order Decr => new Order("decr");
-		public static Order Incr => new Order("incr");
-		public static Order KeyDecr => new Order("keyDecr");
-		public static Order KeyIncr => new Order("keyIncr");
-		public static Order Shuffle => new Order("shuffle");
-		public static Order ValueDecr => new Order("valueDecr");
-		public static Order ValueIncr => new Order("valueIncr");
+ 
+        public static Order Decr => new Order("decr"); 
+        public static Order Incr => new Order("incr"); 
+        public static Order KeyDecr => new Order("keyDecr"); 
+        public static Order KeyIncr => new Order("keyIncr"); 
+        public static Order Shuffle => new Order("shuffle"); 
+        public static Order ValueDecr => new Order("valueDecr"); 
+        public static Order ValueIncr => new Order("valueIncr");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
index a47d4a6..d4132ea 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pick.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("Pick", enumValue)
         {            
         }
-
-        public static Pick Any => new Pick("any");
-		public static Pick None => new Pick("none");
+ 
+        public static Pick Any => new Pick("any"); 
+        public static Pick None => new Pick("none");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
index 9e97a09..8a157c5 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Pop.cs
@@ -32,10 +32,10 @@ namespace Gremlin.Net.Process.Traversal
             : base("Pop", enumValue)
         {            
         }
-
-        public static Pop All => new Pop("all");
-		public static Pop First => new Pop("first");
-		public static Pop Last => new Pop("last");
+ 
+        public static Pop All => new Pop("all"); 
+        public static Pop First => new Pop("first"); 
+        public static Pop Last => new Pop("last");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
index 65a6e67..ee67c39 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Scope.cs
@@ -32,9 +32,9 @@ namespace Gremlin.Net.Process.Traversal
             : base("Scope", enumValue)
         {            
         }
-
-        public static Scope Global => new Scope("global");
-		public static Scope Local => new Scope("local");
+ 
+        public static Scope Global => new Scope("global"); 
+        public static Scope Local => new Scope("local");
     }
     
 #pragma warning restore 1591

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4d5768b0/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
index c0e5927..bae1314 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/T.cs
@@ -32,11 +32,11 @@ namespace Gremlin.Net.Process.Traversal
             : base("T", enumValue)
         {            
         }
-
-        public static T Id => new T("id");
-		public static T Key => new T("key");
-		public static T Label => new T("label");
-		public static T Value => new T("value");
+ 
+        public static T Id => new T("id"); 
+        public static T Key => new T("key"); 
+        public static T Label => new T("label"); 
+        public static T Value => new T("value");
     }
     
 #pragma warning restore 1591