public IntervalBackupStatusValidator(
     string requestedStatus, int secondsToWait, int secondsInterval, 
     HttpBackupStatus httpBackupStatus, IntervalHandler intervalHandler)
 {
     _requestedStatus = requestedStatus;
     _secondsToWait = secondsToWait;
     _secondsInterval = secondsInterval;
     _httpBackupStatus = httpBackupStatus;
     _intervalHandler = intervalHandler;
 }
예제 #2
0
    internal NodaTimeTypeHandlerResolver(NpgsqlConnector connector)
    {
        _databaseInfo = connector.DatabaseInfo;

        _timestampHandler = LegacyTimestampBehavior
            ? new LegacyTimestampHandler(PgType("timestamp without time zone"))
            : new TimestampHandler(PgType("timestamp without time zone"));
        _timestampTzHandler = LegacyTimestampBehavior
            ? new LegacyTimestampTzHandler(PgType("timestamp with time zone"))
            : new TimestampTzHandler(PgType("timestamp with time zone"));
        _dateHandler     = new DateHandler(PgType("date"));
        _timeHandler     = new TimeHandler(PgType("time without time zone"));
        _timeTzHandler   = new TimeTzHandler(PgType("time with time zone"));
        _intervalHandler = new IntervalHandler(PgType("interval"));

        // Note that the range handlers are absent on some pseudo-PostgreSQL databases (e.g. CockroachDB), and multirange types
        // were only introduced in PG14. So we resolve these lazily.

        _arrayNullabilityMode = connector.Settings.ArrayNullabilityMode;
    }
 public void Setup()
 {
     _httpBackupStatus = A.Fake<HttpBackupStatus>();
     _intervalHandler = A.Fake<IntervalHandler>();
 }
 public BackupFinishedValidator(int secondsToWait, int secondsInterval, 
                                HttpBackupStatus httpBackupStatus, IntervalHandler intervalHandler)
     : base("Idle", secondsToWait, secondsInterval, httpBackupStatus, intervalHandler)
 {
 }
 public BackupStartedValidator(int secondsToWait, int secondsInterval, 
                               HttpBackupStatus httpBackupStatus, IntervalHandler intervalHandler)
     : base("Running", secondsToWait, secondsInterval, httpBackupStatus, intervalHandler)
 {
 }