示例#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();
        }
示例#2
0
 public void MockAdvice(SetFieldJointPoint jp)
 {
     advice(jp);
 }
示例#3
0
 public abstract object AroundSet(SetFieldJointPoint jp);