Skip to content

Conversation

@jorgebay
Copy link
Contributor

@jorgebay jorgebay commented Jun 8, 2017

Added type safety to traversal interface. For example:

Vertex vertex = g.V().Next();
// Compile time error
Edge edge = g.V().Next();

As C# generics is more strict than in Java, some methods require the user to specify the expected type:

// Specify the type of the value of the property "age"
IList<int> userAgeList = g.V().HasLabel("user").Values<int>("age").ToList();

Additionally, I've changed the letter case of the enums generated in C# to match the C# naming convention, ie: g.V().Values<int>("age").Order().By(Order.Decr)

@jorgebay
Copy link
Contributor Author

jorgebay commented Jun 8, 2017

cc @FlorianHockmann

@asfgit asfgit merged commit 027524a into apache:TINKERPOP-1552 Jun 8, 2017
FlorianHockmann added a commit to FlorianHockmann/tinkerpop that referenced this pull request Jun 9, 2017
This mainly removes explicit type casting that are now obsolete thanks to changes from the pull request apache#620. It also makes the Dictionary CSharpToJavaEnums in NamingConversions private to avoid direct access to it as GetEnumJavaName should be used instead.
asfgit pushed a commit that referenced this pull request Jun 19, 2017
This mainly removes explicit type casting that are now obsolete thanks to changes from the pull request #620. It also makes the Dictionary CSharpToJavaEnums in NamingConversions private to avoid direct access to it as GetEnumJavaName should be used instead.
asfgit pushed a commit that referenced this pull request Jun 28, 2017
This mainly removes explicit type casting that are now obsolete thanks to changes from the pull request #620. It also makes the Dictionary CSharpToJavaEnums in NamingConversions private to avoid direct access to it as GetEnumJavaName should be used instead.
asfgit pushed a commit that referenced this pull request Jul 12, 2017
This mainly removes explicit type casting that are now obsolete thanks to changes from the pull request #620. It also makes the Dictionary CSharpToJavaEnums in NamingConversions private to avoid direct access to it as GetEnumJavaName should be used instead.
asfgit pushed a commit that referenced this pull request Jul 13, 2017
This mainly removes explicit type casting that are now obsolete thanks to changes from the pull request #620. It also makes the Dictionary CSharpToJavaEnums in NamingConversions private to avoid direct access to it as GetEnumJavaName should be used instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants