private async Task Probe(IContainer container) { var settings = new DatabaseSharedSetting { Url = GetArangoUrl(), Database = DatabaseName, Credential = new NetworkCredential(Username, Password) }; using (var db = new ArangoDatabase(settings)) { await db.CreateStatement <int>(TestQueryString).ToListAsync(); } }
private static async Task <Exception> ProbeForException(string arangoUrl, string database, string username, string password) { var settings = new DatabaseSharedSetting { Url = arangoUrl, Database = database, Credential = new NetworkCredential(username, password) }; using (var db = new ArangoDatabase(settings)) { return(await Record.ExceptionAsync(async() => await db.CreateStatement <int>("RETURN 1").ToListAsync())); } }