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

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

GitHub user spmallette opened a pull request:

    https://github.com/apache/tinkerpop/pull/758

    TINKERPOP-1734 DSL for Gremlin .NET

    https://issues.apache.org/jira/browse/TINKERPOP-1734
    
    Provided tests and documentation for implementing DSLs in .Net. No changes 
were needed to the code base for this - just used C# extension methods as 
suggested by @jorgebay . Only downside was anonymous traversals are a little 
weird because C# doesn't let you extend static classes and extensions methods 
can't be used on them either. The only recourse is to wrap static methods in 
the extending class which is a lot of extra boilerplate. I opted to just 
recommend that users create their own class for spawning anonymous traversals 
that just works independently of `__`. 
    
    VOTE +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1734

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/758.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #758
    
----
commit 3811e31c05a77cf78abb7b2ecf3d0fa40983f51a
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2017-11-29T20:17:26Z

    TINKERPOP-1734 Test for DSLs with .NET

commit d0520bfac978cfd08ea3448f75f2ac91a5caac7e
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2017-11-29T20:45:41Z

    TINKERPOP-1734 Added DSL tests for anonymous traversals
    
    Can't extend __ with extension methods and can't extend static classes in 
C# so not sure what else to do here. The only thing you can do is write wrapper 
methods in your DSL for the __ methods which kinda stinks. I guess we could do 
code generation here, but doesn't seem worth it. Not sure.

commit 36b84af97cc0a435cda2e1e5368b9ae960ab7fae
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2017-11-29T20:47:44Z

    TINKERPOP-1734 Updated changelog

commit def2b66abc198aa6c492c8cf6de9fac902448a9e
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2017-11-29T21:15:24Z

    TINKERPOP-1734 Documentation for DSLs in .Net

commit f766cca834099a2b6f99800393b39b12bf08c7e4
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2017-11-29T21:16:28Z

    TINKERPOP-1734 Fixed up c# formatting

----


> DSL for Gremlin .NET
> --------------------
>
>                 Key: TINKERPOP-1734
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1734
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: dotnet
>    Affects Versions: 3.2.5
>            Reporter: stephen mallette
>
> This may just be a documentation issue, but we need to determine the approach 
> to building DSLs with .NET. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to