private void SetDefaultValues() { _fullSync = false; _offset = null; _pageSize = _service.PageSize; _defaultTimeout = _service.DefaultTimeout; _maxTimeout = _service.MaxTimeout; _maxReties = _service.MaxReties; _directErrors = new SyncErrorsCount(); _reverseErrors = new SyncErrorsCount(); }
private bool CanRetry(ISyncEngine engine, bool reverse) { SyncErrorsCount errors = reverse ? _reverseErrors : _directErrors; DateTime offset = reverse ? engine.RestoreOffset : engine.SyncOffset; if (errors.Offseet == offset) { errors.Count++; } else { errors.Offseet = offset; errors.Count = 1; } return(errors.Count < _maxReties); }