public async Task <string> GetDkimHistory(string domain)
        {
            string connectionString = await _connectionInfo.GetConnectionStringAsync();

            string history = (string)await MySqlHelper.ExecuteScalarAsync(
                connectionString, DkimApiDaoResources.GetDkimHistory, new MySqlParameter("domain", domain));

            return(history);
        }
        public async Task <EntityDkimEntityState> GetDkimSelectors(string domain)
        {
            string connectionString = await _connectionInfo.GetConnectionStringAsync();

            string serializedDkim = (string)await MySqlHelper.ExecuteScalarAsync(
                connectionString, DkimApiDaoResources.GetDkimResult, new MySqlParameter("domain", domain));

            return(serializedDkim == null
                ? null
                : JsonConvert.DeserializeObject <EntityDkimEntityState>(serializedDkim, _serializerSettings));
        }
Пример #3
0
        public async Task <DkimHistoryEntityState> Get(string domain)
        {
            string connectionString = await _connectionInfoAsync.GetConnectionStringAsync();

            string state = (string)await MySqlHelper.ExecuteScalarAsync(connectionString, DkimEntityHistoryDaoResouces.SelectDkimEntityHistory,
                                                                        new MySqlParameter("domain", domain));

            return(state == null
                ? null
                : JsonConvert.DeserializeObject <DkimHistoryEntityState>(state));
        }
Пример #4
0
        public async Task <DkimSchedulerState> Get(string domain)
        {
            string connectionString = await _connectionInfo.GetConnectionStringAsync();

            string id = (string)await MySqlHelper.ExecuteScalarAsync(connectionString, DkimSchedulerDaoResources.SelectDkimRecord,
                                                                     new MySqlParameter("domain", domain));

            return(id == null
                ? null
                : new DkimSchedulerState(id));
        }
Пример #5
0
        public async Task <SpfSchedulerState> Get(string domain)
        {
            string id = (string)await MySqlHelper.ExecuteScalarAsync(
                await _connectionInfo.GetConnectionStringAsync(),
                SpfSchedulerDaoResources.SelectSpfRecord,
                new MySqlParameter("id", domain));

            return(id == null
                ? null
                : new SpfSchedulerState(id));
        }
Пример #6
0
 private async Task <DateTime> GetLastChecked(string domain) =>
 (DateTime)await MySqlHelper.ExecuteScalarAsync(ConnectionString,
                                                $"SELECT last_checked FROM spf_scheduled_records WHERE id = @domain",
                                                new MySqlParameter("domain", domain));