Guest User

Untitled

a guest
Oct 10th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. NullReferenceException: Object reference not set to an instance of an object.
  2.  
  3. at Gremlin.Net.Driver.Connection.ReceiveAsync[T]()
  4. at Gremlin.Net.Driver.Connection.SubmitAsync[T](RequestMessage requestMessage)
  5. at Gremlin.Net.Driver.ProxyConnection.SubmitAsync[T](RequestMessage requestMessage)
  6. at Gremlin.Net.Driver.GremlinClient.SubmitAsync[T](RequestMessage requestMessage)
  7. at Gremlin.Net.Driver.GremlinClientExtensions.SubmitAsync[T](IGremlinClient gremlinClient, String requestScript, Dictionary`2 bindings)
  8.  
  9. private static string database = "db";
  10. private static string collection = "col";
  11. private static string hostname = "grem-test.gremlin.cosmosdb.azure.com";
  12. public void test()
  13. {
  14. var gremlinServer = new GremlinServer(hostname, 443, enableSsl: true,
  15. username: "/dbs/" + database + "/colls/" + collection,
  16. password: authKey);
  17. var gremlinClient = new GremlinClient(gremlinServer);
  18. var grem = "g.V()";
  19. var t = gremlinClient.SubmitAsync<dynamic>(grem);
  20. t.Wait();
  21.  
  22. foreach (var result in t.Result)
  23. {
  24. // The vertex results are formed as dictionaries with a nested dictionary for their properties
  25. string output = JsonConvert.SerializeObject(result);
  26. Console.WriteLine(String.Format("tResult:nt{0}", output));
  27. }
Add Comment
Please, Sign In to add comment