Skip to content

Commit e331dcc

Browse files
committed
Dotnet example
Signed-off-by: Dwitry <[email protected]>
1 parent d5ccdae commit e331dcc

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
var client = new GremlinClient(new GremlinServer(GremlinServerHostname, GremlinServerPort));
2+
var requestMessage = RequestMessage.Build(Tokens.OpsEval)
3+
.AddArgument(Tokens.ArgsGremlin, "RETURN 2")
4+
.Processor("cypher")
5+
.Create();
6+
var result = await client.SubmitAsync<object>(requestMessage);

tinkerpop/cypher-gremlin-server-plugin/README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ client.execute('MATCH (n) RETURN count(n)', (err, results) => {
9494

9595
### Gremlin-Python
9696

97-
Example connect using [Gremlin-Python](http://tinkerpop.apache.org/docs/current/reference/#gremlin-python) by creating custom `RequestMessage`
97+
Example connect using [Gremlin-Python](http://tinkerpop.apache.org/docs/current/reference/#gremlin-python) by creating custom `RequestMessage`:
9898

9999
<!-- [freshReadmeSource](../../testware/integration-tests/src/test/resources/snippets/gremlin-python.py) -->
100100
```python
@@ -118,9 +118,18 @@ print(result_set.all().result())
118118

119119
### Gremlin.Net
120120

121-
Example connect using [Gremlin-Python](http://tinkerpop.apache.org/docs/current/reference/#gremlin-DotNet)
121+
Example connect using [Gremlin-Python](http://tinkerpop.apache.org/docs/current/reference/#gremlin-DotNet) by creating custom `RequestMessage`:
122122

123-
todo
123+
<!-- [freshReadmeSource](../../testware/integration-tests/src/test/resources/snippets/gremlin-dotnet.cs) -->
124+
```dotnet
125+
var client = new GremlinClient(new GremlinServer(GremlinServerHostname, GremlinServerPort));
126+
var requestMessage = RequestMessage.Build(Tokens.OpsEval)
127+
.AddArgument(Tokens.ArgsGremlin, "RETURN 2")
128+
.Processor("cypher")
129+
.Create();
130+
var result = await client.SubmitAsync<object>(requestMessage);
131+
132+
```
124133

125134

126135
## Troubleshooting

0 commit comments

Comments
 (0)