public static void Perform(IDatabaseConnectionSettings connectionSettings) { var rest = new RestConnector(connectionSettings); var flwor = new Flwor(new XdmpNodeDelete(FnDoc.AllDocuments.Query)); rest.Submit(flwor.Query); }
/// <summary> /// Creating our auth controller /// </summary> /// <param name="helloWorldUser"></param> /// <param name="dataAccess"></param> /// <param name="dbConnectionSettings"></param> public AuthController(IHelloWorldParameters helloWorldParams, IHelloWorldUser helloWorldUser, IDataAccess <IDataParameterCollection> dataAccess, IDatabaseConnectionSettings dbConnectionSettings) { this.DataAccess = dataAccess; this.DatabaseConnectionSettings = dbConnectionSettings; this.HelloWorldUser = helloWorldUser; }
/// <summary> /// Creating a new instance of the session handler /// </summary> /// <param name="dataAccess"></param> /// <param name="dbConnectionSettings"></param> /// <param name="helloWorldParams"></param> /// <param name="helloWorldUser"></param> public SessionHandler(IDataAccess <IDataParameterCollection> dataAccess, IDatabaseConnectionSettings dbConnectionSettings, IHelloWorldParameters helloWorldParams, IHelloWorldUser helloWorldUser) { this.DataAccess = dataAccess; this.DatabaseConnectionSettings = dbConnectionSettings; this.HelloWorldParams = helloWorldParams; this.HelloWorldUser = helloWorldUser; }
public void Initialize() { var browserMock = new Mock <IBrowser>(); browserMock.Setup(x => x.GetPage(It.IsAny <Uri>())) .Returns(HtmlNode.CreateNode("To ogłoszenie jest nieaktualne")); _browser = browserMock.Object; var loggerMock = new Mock <ILogger>(); loggerMock.Setup(x => x.Log(It.IsAny <LogType>(), It.IsAny <string>())); _logger = loggerMock.Object; _dbConnectionSettings = new DatabaseConnectionSettings("vps561493.ovh.net", 8086, "admin", "admin"); _dbOfferRepository = new DatabaseOfferRepository(_dbConnectionSettings); _sut = new OfferLinkCleanupActivity(_dbOfferRepository, _browser, _logger); }
public RestConnector(IDatabaseConnectionSettings connectionSettings) { var clientHandler = new HttpClientHandler() { Credentials = new NetworkCredential(connectionSettings.UserName, connectionSettings.Password), PreAuthenticate = true, AllowAutoRedirect = false, UseCookies = false, MaxConnectionsPerServer = 1 }; _client = new HttpClient(clientHandler) { Timeout = TimeSpan.FromSeconds(TransactionTimeLimit), BaseAddress = new Uri($"http://{connectionSettings.Host}:{connectionSettings.Port}") }; }
public DatabaseOfferRepository(IDatabaseConnectionSettings databaseConnectionSettings) : base(databaseConnectionSettings, ExtractOfferInfo) { }
public DatabaseSearchCriteriaRepository(IDatabaseConnectionSettings databaseConnectionSettings) : base(databaseConnectionSettings, ExtractSearchModelInfo) { }
public NpgsqlDbFactory(IDatabaseConnectionSettings connectionSettings) : base(CreateConnectionString(connectionSettings)) { }
private static string CreateConnectionString(IDatabaseConnectionSettings settings) { return($"User ID={settings.User};Password={settings.Password};Host={settings.Host};Port={settings.Port};Database={settings.DatabaseName};Pooling={settings.Pooling};"); }
public DataRepository(IDatabaseConnectionSettings databaseConnectionSettings, Func <XDocument, T> extractionMethod) { DatabaseConnectionSettings = databaseConnectionSettings; RestConnector = new RestConnector(DatabaseConnectionSettings); _extractionMethod = extractionMethod; }
public DatabaseHtmlDataRepository(IDatabaseConnectionSettings databaseConnectionSettings) : base(databaseConnectionSettings, ExtractHtmlDataInfo) { }
/// <summary> /// Create object-relational mapping for child entities. /// </summary> /// <param name="connectionSettings">Database connection settings.</param> protected ChildEntityTypeTableMapping(IDatabaseConnectionSettings connectionSettings) : base(connectionSettings) { }
/// <summary> /// Create object-relational mapping. /// </summary> /// <param name="connectionSettings">Database connection settings.</param> protected EntityTypeTableMapping(IDatabaseConnectionSettings connectionSettings) { this.connectionSettings = connectionSettings; this.namingConvention = new DatabaseNamingConvention(connectionSettings.ServerType); }
public DatabaseLinkRepository(IDatabaseConnectionSettings databaseConnectionSettings) : base(databaseConnectionSettings, ExtractLinkInfo) { }
/// <summary> /// Create database context. /// </summary> /// <param name="options">Options.</param> /// <param name="logFactory">Log factory.</param> /// <param name="connectionSettings">Database connection settings.</param> public BaseDbContext(DbContextOptions options, ILoggerFactory logFactory, IDatabaseConnectionSettings connectionSettings = null) : base(options) { this.ConnectionSettings = connectionSettings; this.logFactory = logFactory; }
public DatabaseUtilityRepository(IDatabaseConnectionSettings databaseConnectionSettings) : base(databaseConnectionSettings, null) { }
public Migrator(IDatabaseConnectionSettings settings) { connectionString = buildPostgresConnectionString(settings); builder = DeployChanges.To.PostgresqlDatabase(connectionString); }
public DatabaseCommandRepository(IDatabaseConnectionSettings databaseConnectionSettings) : base(databaseConnectionSettings, ExtractCommandInfo) { }