Class GremlinClientExtensions
Provides extension methods for the IGremlinClient interface.
Inheritance
Inherited Members
Namespace: Gremlin.Net.Driver
Assembly: cs.temp.dll.dll
Syntax
public static class GremlinClientExtensions
Methods
SubmitAsync(IGremlinClient, RequestMessage)
Submits a request message as an asynchronous operation without returning the result received from the Gremlin Server.
Declaration
public static Task SubmitAsync(this IGremlinClient gremlinClient, RequestMessage requestMessage)
Parameters
Type | Name | Description |
---|---|---|
IGremlinClient | gremlinClient | The IGremlinClient that submits the request. |
RequestMessage | requestMessage | The RequestMessage to send. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task object representing the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
ResponseException | Thrown when a response is received from Gremlin Server that indicates that an error occurred. |
SubmitAsync(IGremlinClient, String, Dictionary<String, Object>)
Submits a request message that consists of a script with bindings as an asynchronous operation without returning the result received from the Gremlin Server.
Declaration
public static Task SubmitAsync(this IGremlinClient gremlinClient, string requestScript, Dictionary<string, object> bindings = null)
Parameters
Type | Name | Description |
---|---|---|
IGremlinClient | gremlinClient | The IGremlinClient that submits the request. |
System.String | requestScript | The Gremlin request script to send. |
System.Collections.Generic.Dictionary<System.String, System.Object> | bindings | Bindings for parameters used in the requestScript. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The task object representing the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
ResponseException | Thrown when a response is received from Gremlin Server that indicates that an error occurred. |
SubmitAsync<T>(IGremlinClient, String, Dictionary<String, Object>)
Submits a request message that consists of a script with bindings as an asynchronous operation.
Declaration
public static Task<ResultSet<T>> SubmitAsync<T>(this IGremlinClient gremlinClient, string requestScript, Dictionary<string, object> bindings = null)
Parameters
Type | Name | Description |
---|---|---|
IGremlinClient | gremlinClient | The IGremlinClient that submits the request. |
System.String | requestScript | The Gremlin request script to send. |
System.Collections.Generic.Dictionary<System.String, System.Object> | bindings | Bindings for parameters used in the requestScript. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultSet<T>> | A ResultSet<T> containing the data and status attributes returned from the server. |
Type Parameters
Name | Description |
---|---|
T | The type of the expected results. |
Exceptions
Type | Condition |
---|---|
ResponseException | Thrown when a response is received from Gremlin Server that indicates that an error occurred. |
SubmitWithSingleResultAsync<T>(IGremlinClient, RequestMessage)
Submits a request message as an asynchronous operation where only a single result gets returned.
Declaration
public static Task<T> SubmitWithSingleResultAsync<T>(this IGremlinClient gremlinClient, RequestMessage requestMessage)
Parameters
Type | Name | Description |
---|---|---|
IGremlinClient | gremlinClient | The IGremlinClient that submits the request. |
RequestMessage | requestMessage | The RequestMessage to send. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<T> | A single result received from the Gremlin Server. |
Type Parameters
Name | Description |
---|---|
T | The type of the expected result. |
Remarks
If multiple results are received from Gremlin Server, then only the first gets returned. Use SubmitAsync<T>(IGremlinClient, String, Dictionary<String, Object>) instead when you expect a collection of results.
Exceptions
Type | Condition |
---|---|
ResponseException | Thrown when a response is received from Gremlin Server that indicates that an error occurred. |
SubmitWithSingleResultAsync<T>(IGremlinClient, String, Dictionary<String, Object>)
Submits a request message that consists of a script with bindings as an asynchronous operation where only a single result gets returned.
Declaration
public static Task<T> SubmitWithSingleResultAsync<T>(this IGremlinClient gremlinClient, string requestScript, Dictionary<string, object> bindings = null)
Parameters
Type | Name | Description |
---|---|---|
IGremlinClient | gremlinClient | The IGremlinClient that submits the request. |
System.String | requestScript | The Gremlin request script to send. |
System.Collections.Generic.Dictionary<System.String, System.Object> | bindings | Bindings for parameters used in the requestScript. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<T> | A single result received from the Gremlin Server. |
Type Parameters
Name | Description |
---|---|
T | The type of the expected result. |
Remarks
If multiple results are received from Gremlin Server, then only the first gets returned. Use SubmitAsync<T>(IGremlinClient, String, Dictionary<String, Object>) instead when you expect a collection of results.
Exceptions
Type | Condition |
---|---|
ResponseException | Thrown when a response is received from Gremlin Server that indicates that an error occurred. |