Exemplo n.º 1
0
        public virtual void OnFieldSet(SetFieldJointPoint jp)
        {
            if (jp.Target == jp.This)
            {
                OnChanged((INotifyPropertyChanged)jp.This, jp.Field);

                PropertyChangedEventHandler evHandler = (o, e) => OnChanged((INotifyPropertyChanged)jp.This, jp.Field);

                if (jp.Value is INotifyPropertyChanged observable)
                {
                    observable.PropertyChanged += evHandler;
                }

                if (jp.Field.GetValue(jp.This) is INotifyPropertyChanged originalObservable)
                {
                    originalObservable.PropertyChanged -= evHandler;
                }
            }
            jp.Execute();
        }
Exemplo n.º 2
0
 public void MockAdvice(SetFieldJointPoint jp)
 {
     advice(jp);
 }
Exemplo n.º 3
0
 public abstract object AroundSet(SetFieldJointPoint jp);