public void Changed(Replication.ChangeEvent @event) { if (@event.GetSource().IsRunning() == false) { if (this._enclosing.activeReplicators != null) { this._enclosing.activeReplicators.Remove(@event.GetSource()); } } }
public virtual void Changed(Replication.ChangeEvent @event) { Replication replicator = @event.GetSource(); if (!replicator.IsRunning()) { this.replicationFinished = true; string msg = string.Format("myobserver.update called, set replicationFinished to: %b" , this.replicationFinished); Log.D(ReplicationTest.Tag, msg); this.doneSignal.CountDown(); } else { string msg = string.Format("myobserver.update called, but replicator still running, so ignore it" ); Log.D(ReplicationTest.Tag, msg); } }
public void Changed(Replication.ChangeEvent @event) { int changesCount = @event.GetSource().GetChangesCount(); int completedChangesCount = @event.GetSource().GetCompletedChangesCount(); string msg = string.Format("changes: %d completed changes: %d", changesCount, completedChangesCount ); Log.D(ReplicationTest.Tag, msg); if (changesCount == completedChangesCount && changesCount != 0) { replicationCaughtUpSignal.CountDown(); } }
public void Changed(Replication.ChangeEvent @event) { Replication replication = @event.GetSource(); if (replication.GetLastError() != null) { Exception lastError = replication.GetLastError(); if (lastError is HttpResponseException) { HttpResponseException responseException = (HttpResponseException)lastError; if (responseException.GetStatusCode() == 401) { this._enclosing.onSyncUnauthorizedObservable.NotifyChanges(); } } } this._enclosing.UpdateSyncProgress(replication.GetCompletedChangesCount(), replication .GetChangesCount()); }
public void Changed(Replication.ChangeEvent @event) { if (@event.GetSource().online) { wentOnline.CountDown(); } }