Guest User

Untitled

a guest
Oct 24th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. private static string hostname = "yourhostname.gremlin.cosmosdb.azure.com";
  2. private static int port = 443;
  3. private static string authKey = "yourAuthKey";
  4. private static string database = "yourGraphDbName";
  5. private static string collection = "yourGraph";
  6.  
  7. static async Task Main(string[] args)
  8. {
  9. string[] names = {
  10. "Hazel", "Madeline", "Isaac", "Shelia", "Christy", "Thelma", "Kara", "Johnnie", "Ron", "Frances",
  11. "Eddie", "Mona", "Jose", "Santos", "Joyce", "Jim", "Shannon", "Ralph", "Benjamin", "Estelle", "Celia"
  12. };
  13.  
  14. var gremlinServer = new GremlinServer(
  15. hostname, port,
  16. enableSsl: true,
  17. username: "/dbs/" + database + "/colls/" + collection,
  18. password: authKey);
  19.  
  20. var queries = ConstructSociogram(names);
  21. await ExecuteGraphQueriesAsync(gremlinServer, queries);
  22.  
  23. Console.WriteLine("Graph constructed. B-)");
  24. Console.ReadLine();
  25. }
Add Comment
Please, Sign In to add comment