Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for local Cosmos DB emulator #3

Merged
merged 1 commit into from
Jul 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/Gremlin.Net.CosmosDb/GraphClient.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Gremlin.Net.CosmosDb.Serialization;
using System;
using System.Threading.Tasks;
using Gremlin.Net.CosmosDb.Serialization;
using Gremlin.Net.CosmosDb.Structure;
using Gremlin.Net.Driver;
using Newtonsoft.Json.Linq;
using System;
using System.Threading.Tasks;

namespace Gremlin.Net.CosmosDb
{
Expand All @@ -25,9 +25,10 @@ public class GraphClient : IGraphClient, IDisposable
/// <param name="databaseName">Name of the database (case-sensitive).</param>
/// <param name="graphName">Name of the graph.</param>
/// <param name="accessKey">The access key.</param>
public GraphClient(string gremlinHostname, string databaseName, string graphName, string accessKey)
public GraphClient(string gremlinHostname, string databaseName, string graphName, string accessKey,
int port = 443, bool useSSL = true)
{
var server = new GremlinServer(gremlinHostname, 443, true, $"/dbs/{databaseName}/colls/{graphName}", accessKey);
var server = new GremlinServer(gremlinHostname, port, useSSL, $"/dbs/{databaseName}/colls/{graphName}", accessKey);

_gremlinClient = new GremlinClient(server, new GraphSONJTokenReader(), mimeType: GremlinClient.GraphSON2MimeType);
}
Expand Down