Show / Hide Table of Contents

Class GremlinClientExtensions

Provides extension methods for the IGremlinClient interface.

Inheritance
System.Object
GremlinClientExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:Gremlin.Net
Assembly:Gremlin.Net.dll
Syntax
public static class GremlinClientExtensions

Methods

| Improve this Doc View Source

SubmitAsync(IGremlinClient, ScriptRequestMessage)

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, ScriptRequestMessage requestMessage)
Parameters
Type Name Description
IGremlinClient gremlinClient

The IGremlinClient that submits the request.

ScriptRequestMessage requestMessage

The ScriptRequestMessage 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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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<IEnumerable<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<System.Collections.Generic.IEnumerable<T>>

An enumerable collection of the data 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.

| Improve this Doc View Source

SubmitWithSingleResultAsync<T>(IGremlinClient, ScriptRequestMessage)

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, ScriptRequestMessage requestMessage)
Parameters
Type Name Description
IGremlinClient gremlinClient

The IGremlinClient that submits the request.

ScriptRequestMessage requestMessage

The ScriptRequestMessage 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.

| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX