private void UpdateStateProperties(C4ReplicatorStatus state) { Exception error = null; if (state.error.code > 0) { error = CouchbaseException.Create(state.error); } _rawStatus = state; var level = (ReplicatorActivityLevel)state.level; var progress = new ReplicatorProgress(state.progress.unitsCompleted, state.progress.unitsTotal); Status = new ReplicatorStatus(level, progress, error); WriteLog.To.Sync.I(Tag, $"{this} is {state.level}, progress {state.progress.unitsCompleted}/{state.progress.unitsTotal}"); }
internal ReplicatorStatus(ReplicatorActivityLevel activity, ReplicatorProgress progress, Exception error) { Activity = activity; Progress = progress; Error = error; }