public ChangeFileVm(ChangeFile model) { Debug.Assert(model != null); _model = model; MultipleDisposable.AddFirst(() => { lock (_diffMakingLockObj) { if (IsDiffMaking) _disposeResetEvent = new ManualResetEventSlim(); } }); // Path = model.ObserveProperty(x => x.Path).ToReactiveProperty().AddTo(MultipleDisposable); Status = model.ObserveProperty(x => x.Status).ToReactiveProperty().AddTo(MultipleDisposable); // DiffLines.AddTo(MultipleDisposable); // //LinesAdded = model.ObserveProperty(x => x.LinesAdded, false).ToReactiveProperty().AddTo(MultipleDisposable); //LinesDeleted = model.ObserveProperty(x => x.LinesDeleted, false).ToReactiveProperty().AddTo(MultipleDisposable); IsBinary = model.ObserveProperty(x => x.IsBinary, false).ToReactiveProperty().AddTo(MultipleDisposable); }
public ChangeBaseFileVm(ChangeFile model) { Debug.Assert(model != null); _model = model; if (_model.IsBinary == false) this.MakeDiff(_model.Patch); }
public void CopyFrom(ChangeFile source) { Path = source.Path; Patch = source.Patch; //LinesAdded = source.LinesAdded; //LinesDeleted = source.LinesDeleted; Status = source.Status; IsBinary = source.IsBinary; }