Пример #1
0
 public UndoItem( UndoableAttribute parent, object newValue, object oldValue, ILocationBinding binding )
 {
     this.newValue = newValue;
     this.parent = parent;
     this.oldValue = oldValue;
     this.binding = binding;
 }
Пример #2
0
        public LocationBindingFactory <TILocationContainer> For <TDataItem>(Action <LocationBindingBuilder <TILocationContainer, TDataItem> > action)
        {
            if (action == null)
            {
                throw new ArgumentNullException(nameof(action));
            }

            this.Binder = new LocationBinding <TILocationContainer, TDataItem>();
            var builder = new LocationBindingBuilder <TILocationContainer, TDataItem>((LocationBinding <TILocationContainer, TDataItem>) this.Binder);

            action(builder);

            return(this);
        }
        public void InterceptSet(ILocationBinding binding, object value)
        {
            InitializeIfNeeded();

            binding.SetValue(ref target, null, value);
        }
        public object InterceptGet(ILocationBinding binding)
        {
            InitializeIfNeeded();

            return binding.GetValue(ref target, null);
        }