コード例 #1
0
        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}");
        }
コード例 #2
0
 internal ReplicatorStatus(ReplicatorActivityLevel activity, ReplicatorProgress progress, Exception error)
 {
     Activity = activity;
     Progress = progress;
     Error    = error;
 }