public static IServiceCollection AddArango(this IServiceCollection collection, string connectionString, IArangoConfiguration settings = null) { if (collection == null) { throw new ArgumentNullException(nameof(collection)); } if (connectionString == null) { throw new ArgumentNullException(nameof(connectionString)); } return(collection.AddSingleton <IArangoContext>(serviceProvider => new ArangoContext(connectionString, settings))); }
public ArangoContext(IArangoConfiguration config) { Configuration = config ?? throw new ArgumentNullException(nameof(config)); User = new ArangoUserModule(this); Collection = new ArangoCollectionModule(this); View = new ArangoViewModule(this); Database = new ArangoDatabaseModule(this); Graph = new ArangoGraphModule(this); Transaction = new ArangoTransactionModule(this); Document = new ArangoDocumentModule(this); Query = new ArangoQueryModule(this); Index = new ArangoIndexModule(this); Analyzer = new ArangoAnalyzerModule(this); Function = new ArangoFunctionModule(this); }
public ArangoContext(string cs, IArangoConfiguration settings = null) { Configuration = settings ?? new ArangoConfiguration(); Configuration.ConnectionString = cs; User = new ArangoUserModule(this); Collection = new ArangoCollectionModule(this); View = new ArangoViewModule(this); Database = new ArangoDatabaseModule(this); Graph = new ArangoGraphModule(this); Transaction = new ArangoTransactionModule(this); Document = new ArangoDocumentModule(this); Query = new ArangoQueryModule(this); Index = new ArangoIndexModule(this); Analyzer = new ArangoAnalyzerModule(this); Function = new ArangoFunctionModule(this); }
public ArangoHttpTransport(IArangoConfiguration configuration) { _configuration = configuration; }