Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public ChangeBaseFileVm(ChangeFile model)
        {
            Debug.Assert(model != null);

            _model = model;

            if (_model.IsBinary == false)
                this.MakeDiff(_model.Patch);
        }
Esempio n. 3
0
 public void CopyFrom(ChangeFile source)
 {
     Path = source.Path;
     Patch = source.Patch;
     //LinesAdded = source.LinesAdded;
     //LinesDeleted = source.LinesDeleted;
     Status = source.Status;
     IsBinary = source.IsBinary;
 }