protected ObservableDataSource(IRepository <TDatabase> repository) : base(repository) { Created = CreatedSubject.AsObservable(); Updated = UpdatedSubject.AsObservable(); Deleted = DeletedSubject.AsObservable(); }
protected void HandleConflictResolutionResult(IConflictResolutionResult <TThreadsafe> result) { switch (result) { case DeleteResult <TThreadsafe> d: DeletedSubject.OnNext(d.Id); return; case CreateResult <TThreadsafe> c: CreatedSubject.OnNext(c.Entity); return; case UpdateResult <TThreadsafe> u: UpdatedSubject.OnNext(new EntityUpdate <TThreadsafe>(u.OriginalId, u.Entity)); return; } }