public static async Task <T> ExecuteScalar <T>(IConnectionInfoAsync connectionInfo, string sql, Action <MySqlParameterCollection> addParameters, Func <object, T> factory = null) { string connectionString = await connectionInfo.GetConnectionStringAsync(); return(await ExecuteScalar(connectionString, sql, addParameters, factory)); }
public static async Task <List <T> > ExecuteReaderListResult <T>(IConnectionInfoAsync connectionInfo, string sql, Action <MySqlParameterCollection> addParameters, Func <DbDataReader, T> factory) { string connectionString = await connectionInfo.GetConnectionStringAsync(); return(await ExecuteReaderListResult(connectionString, sql, addParameters, factory)); }
public static async Task <T> ExecuteReader <T>(IConnectionInfoAsync connectionInfo, string sql, Action <MySqlParameterCollection> addParameters, Func <DbDataReader, Task <T> > factory) where T : class { string connectionString = await connectionInfo.GetConnectionStringAsync(); return(await ExecuteReader(connectionString, sql, addParameters, factory)); }
public void SetUp() { _parameterStoreRequest = A.Fake <IParameterStoreRequest>(); IConnectionInfo connectionInfo = new StringConnectionInfo(_connectionString); _connectionInfoAsync = new ConnectionInfoAsync(_parameterStoreRequest, connectionInfo); }
public DomainTlsSecurityProfileDao(IConnectionInfoAsync connectionInfo, IMxSecurityTesterConfig mxSecurityTesterConfig, ILogger log) { _connectionInfo = connectionInfo; _mxSecurityTesterConfig = mxSecurityTesterConfig; _log = log; }
public static async Task <T> ExecuteScalarTimed <T>(IConnectionInfoAsync connectionInfo, string sql, Action <MySqlParameterCollection> addParameters, Func <object, T> factory, Action <string> log, string callName) { using (Timer timer = new Timer(log, callName)) { return(await ExecuteScalar(connectionInfo, sql, addParameters, factory)); } }
public static Task <T> ExecuteReaderTimed <T>(IConnectionInfoAsync connectionInfo, string sql, Action <MySqlParameterCollection> addParameters, Func <DbDataReader, Task <T> > factory, Action <string> log, string callName) where T : class { using (Timer timer = new Timer(log, callName)) { return(ExecuteReader(connectionInfo, sql, addParameters, factory)); } }
internal MxEntityDao( IConnectionInfoAsync connectionInfo, ILogger <MxEntityDao> log, Func <string, IDictionary <string, object>, Task <int> > saveOperation ) { _connectionInfo = connectionInfo; _log = log; _saveOperation = saveOperation ?? DefaultSaveToDatabase; }
protected override void SetUp() { base.SetUp(); IConnectionInfoAsync connectionInfoAsync = A.Fake <IConnectionInfoAsync>(); _spfConfigReadModelDao = new SpfConfigReadModelDao(connectionInfoAsync, A.Fake <ILogger>()); A.CallTo(() => connectionInfoAsync.GetConnectionStringAsync()).Returns(Task.FromResult(ConnectionString)); }
protected override void SetUp() { base.SetUp(); IConnectionInfoAsync connectionInfo = A.Fake <IConnectionInfoAsync>(); _groupDao = new GroupDao(connectionInfo); A.CallTo(() => connectionInfo.GetConnectionStringAsync()).Returns(ConnectionString); }
protected override void SetUp() { base.SetUp(); _connectionInfoAsync = A.Fake <IConnectionInfoAsync>(); _recordImporterConfig = A.Fake <IRecordImporterConfig>(); _dmarcRecordDao = new DmarcRecordDao(_connectionInfoAsync, _recordImporterConfig, A.Fake <ILogger>()); A.CallTo(() => _connectionInfoAsync.GetConnectionStringAsync()).Returns(Task.FromResult(ConnectionString)); }
protected override void SetUp() { base.SetUp(); IConnectionInfoAsync connectionInfoAsync = A.Fake <IConnectionInfoAsync>(); A.CallTo(() => connectionInfoAsync.GetConnectionStringAsync()).Returns(ConnectionString); _dao = new TlsRptEntityDao(connectionInfoAsync); }
public DmarcRecordDao(IConnectionInfoAsync connectionInfo, IRecordImporterConfig recordImporterConfig, ILogger log) : base(connectionInfo, recordImporterConfig, log, DmarcRecordDaoResources.SelectDomainsWithRecords, DmarcRecordDaoResources.InsertRecord, DmarcRecordDaoResources.InsertRecordValueFormatString, DmarcRecordDaoResources.InsertRecordOnDuplicateKey) { }
public static async Task <List <T> > ExecuteReaderListResultTimed <T>(IConnectionInfoAsync connectionInfo, string sql, Action <MySqlParameterCollection> addParameters, Func <DbDataReader, T> factory, Action <string> log, string callName) { using (Timer timer = new Timer(log, callName)) { string connectionString = await connectionInfo.GetConnectionStringAsync(); return(await ExecuteReaderListResult(connectionString, sql, addParameters, factory)); } }
protected override void SetUp() { base.SetUp(); TruncateDatabase().Wait(); IConnectionInfoAsync connectionInfo = A.Fake <IConnectionInfoAsync>(); A.CallTo(() => connectionInfo.GetConnectionStringAsync()).Returns(ConnectionString); _dao = new SpfSchedulerDao(connectionInfo); }
protected override void SetUp() { base.SetUp(); _connectionInfoAsync = A.Fake <IConnectionInfoAsync>(); _config = A.Fake <IDkimSchedulerConfig>(); A.CallTo(() => _config.RefreshIntervalSeconds).Returns(86400); A.CallTo(() => _config.DomainsLimit).Returns(10); A.CallTo(() => _connectionInfoAsync.GetConnectionStringAsync()).Returns(ConnectionString); _dkimSchedulerDao = new DkimSchedulerDao(_connectionInfoAsync); }
protected DnsRecordDao(IConnectionInfoAsync connectionInfoAsync, IRecordImporterConfig recordImporterConfig, ILogger log, string selectDomainsWithRecords, string insertRecord, string insertRecordValueFormatString, string insertRecordOnDuplicateKey) { _connectionInfoAsync = connectionInfoAsync; _recordImporterConfig = recordImporterConfig; _log = log; _selectDomainsWithRecords = selectDomainsWithRecords; _insertRecord = insertRecord; _insertRecordValueFormatString = insertRecordValueFormatString; _insertRecordOnDuplicateKey = insertRecordOnDuplicateKey; }
protected override void SetUp() { base.SetUp(); TruncateDatabase().Wait(); IConnectionInfoAsync connectionInfoAsync = A.Fake <IConnectionInfoAsync>(); A.CallTo(() => connectionInfoAsync.GetConnectionStringAsync()).Returns(ConnectionString); ISpfPeriodicSchedulerConfig config = A.Fake <ISpfPeriodicSchedulerConfig>(); A.CallTo(() => config.RefreshIntervalSeconds).Returns(0); A.CallTo(() => config.DomainBatchSize).Returns(10); _dao = new SpfPeriodicSchedulerDao(connectionInfoAsync, config); }
public TlsRptPeriodicSchedulerDao(IConnectionInfoAsync connectionInfo, ITlsRptPeriodicSchedulerConfig config) { _connectionInfo = connectionInfo; _config = config; }
public DkimApiApiDao(IConnectionInfoAsync connectionInfoAsync) { _connectionInfo = connectionInfoAsync; }
public DkimHistoryEntityDao(IConnectionInfoAsync connectionInfoAsync) { _connectionInfoAsync = connectionInfoAsync; }
public SpfApiDao(IConnectionInfoAsync connectionInfo) { _connectionInfo = connectionInfo; }
public MetricsDao(IConnectionInfoAsync connectionInfo) { _connectionInfo = connectionInfo; }
public TlsEntityDao(IConnectionInfoAsync connectionInfo) { _connectionInfo = connectionInfo; }
public Ip6ToAsnDao(IConnectionInfoAsync connectionInfo, ILogger <IpToAsnDao> log) : base(connectionInfo, log) { }
public PermissionDao(IConnectionInfoAsync connectionInfo, ILogger <IPermissionDao> log) { _connectionInfo = connectionInfo; _log = log; }
public GroupDao(IConnectionInfoAsync connectionInfo) { _connectionInfo = connectionInfo; }
public MxApiDao(IConnectionInfoAsync connectionInfo, ILogger <MxApiDao> log) { _connectionInfo = connectionInfo; _log = log; }
public AsDao(IConnectionInfoAsync connectionInfo, ILogger <IAsnDao> log) { _connectionInfo = connectionInfo; _log = log; }
public IpAddressDetailsDao(IConnectionInfoAsync connectionInfo, ILogger <IpAddressDetailsDao> log) { _connectionInfo = connectionInfo; _log = log; }