[ 
https://issues.apache.org/jira/browse/TINKERPOP-2452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17283052#comment-17283052
 ] 

ASF GitHub Bot commented on TINKERPOP-2452:
-------------------------------------------

spmallette commented on a change in pull request #1387:
URL: https://github.com/apache/tinkerpop/pull/1387#discussion_r574546098



##########
File path: docs/src/upgrade/release-3.5.x.asciidoc
##########
@@ -121,6 +121,29 @@ 
System.out.println(javascriptTranslator.translate(t).getScript());
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-2451[TINKERPOP-2451]
 
+==== DotNetTranslator
+
+Introduced a `DotNetTranslator` for Java, which is in `gremlin-core` with the 
other language translators. It
+generates a C# representation of Gremlin from bytecode.
+
+[source,java]
+----
+// gremlin-core module
+import 
org.apache.tinkerpop.gremlin.process.traversal.translator.DotNetTranslator;
+
+GraphTraversalSource g = ...;
+Traversal<Vertex,Integer> t = g.V().has("person","name","marko").
+                                where(in("knows")).
+                                values("age").
+                                map(Lambda.function("it.get() + 1"));
+
+Translator.ScriptTranslator dotnetTranslator = DotNetTranslator.of("g");
+System.out.println(dotnetTranslator.translate(t).getScript());
+// OUTPUT: 
g.V().Has("person","name","marko").Where(__.In("knows")).Values<object>("age").Map<object>(()
 => "it.get() + 1")

Review comment:
       added a test for native Lambda usage....will hopefully look to add more 
later on https://issues.apache.org/jira/browse/TINKERPOP-2524




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> DotNetTranslator for Java
> -------------------------
>
>                 Key: TINKERPOP-2452
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2452
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: translator
>    Affects Versions: 3.4.8
>            Reporter: Stephen Mallette
>            Priority: Major
>
> Add a {{DotNetpTranslator}} to Java to translate Gremlin into C#. This one 
> may be tricky given the need to often specify generics in C#. Of course, even 
> if the implementation got someone most of the way to a translation and they 
> had to specify the generics themselves it would be considerably less work 
> than what they are in store for today.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to