You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by jo...@apache.org on 2018/10/31 14:15:59 UTC
[tinkerpop] branch TINKERPOP-2059 updated: TINKERPOP-2059 Fix text
case in C#
This is an automated email from the ASF dual-hosted git repository.
jorgebg pushed a commit to branch TINKERPOP-2059
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/TINKERPOP-2059 by this push:
new a6bfb6f TINKERPOP-2059 Fix text case in C#
a6bfb6f is described below
commit a6bfb6f945d0cddf2ccaa7fd4bc196fa1cbdbd2a
Author: Jorge Bay Gondra <jo...@gmail.com>
AuthorDate: Wed Oct 31 15:15:54 2018 +0100
TINKERPOP-2059 Fix text case in C#
---
gremlin-dotnet/glv/generate.groovy | 2 +-
.../src/Gremlin.Net/Process/Traversal/WithOptions.cs | 14 +++++++-------
.../Gherkin/TraversalEvaluation/WithOptionsParameter.cs | 3 ++-
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/gremlin-dotnet/glv/generate.groovy b/gremlin-dotnet/glv/generate.groovy
index 404fc41..26daa58 100644
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@ -328,7 +328,7 @@ def binding = ["pmethods": P.class.getMethods().
"tokens": gatherTokensFrom([IO, ConnectedComponent, ShortestPath, PageRank, PeerPressure]),
"toCSharpMethodName": toCSharpMethodName,
"withOptions": WithOptions.getDeclaredFields().
- collect {["type": toCSharpType(it.type.simpleName), "name": it.name, "value": toCSharpValue(it.type, it.get(null))]}]
+ collect {["type": toCSharpType(it.type.simpleName), "name": toCSharpMethodName(it.name), "value": toCSharpValue(it.type, it.get(null))]}]
def engine = new groovy.text.GStringTemplateEngine()
def traversalTemplate = engine.createTemplate(new File("${projectBaseDir}/glv/GraphTraversal.template")).make(binding)
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/WithOptions.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/WithOptions.cs
index c99514b..8b79089 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/WithOptions.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/WithOptions.cs
@@ -39,25 +39,25 @@ namespace Gremlin.Net.Process.Traversal.Step.Util
{
- public static readonly string tokens = "~tinkerpop.valueMap.tokens";
+ public static readonly string Tokens = "~tinkerpop.valueMap.tokens";
- public static readonly int none = 0;
+ public static readonly int None = 0;
- public static readonly int ids = 1;
+ public static readonly int Ids = 1;
- public static readonly int labels = 2;
+ public static readonly int Labels = 2;
- public static readonly int keys = 4;
+ public static readonly int Keys = 4;
- public static readonly int values = 8;
+ public static readonly int Values = 8;
- public static readonly int all = 15;
+ public static readonly int All = 15;
}
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/WithOptionsParameter.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/WithOptionsParameter.cs
index db36401..9b055ec 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/WithOptionsParameter.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/WithOptionsParameter.cs
@@ -42,7 +42,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation
{
_text = text;
var separatorIndex = text.IndexOf('.');
- _value = text.Substring(separatorIndex + 1);
+ var value = text.Substring(separatorIndex + 1);
+ _value = value.Substring(0, 1).ToUpper() + value.Substring(1);
}
public bool Equals(WithOptionsParameter other)