internal static ChangeArgs ViewModelPropertyChanged( IVMPropertyDescriptor property, ValueStage stage, IViewModel oldValue, IViewModel newValue, IChangeReason reason = null ) { var oldItems = oldValue != null ? new[] { oldValue } : null; var newItems = newValue != null ? new[] { newValue } : null; return(new ChangeArgs( ChangeType.PropertyChanged, stage, Path.Empty.Append(property), oldItems: oldItems, newItems: newItems, reason: reason ) { ChangedProperty = property }); // TODO: Remove }
public virtual void NotifyPropertyChanged(IBehaviorContext context, ValueStage stage, TValue oldValue, TValue newValue) { var args = ChangeArgs.PropertyChanged( _property, stage, reason: null ); context.NotifyChange(args); this.NotifyPropertyChangedNext(context, stage, oldValue, newValue); }
internal static ChangeArgs PropertyChanged(IVMPropertyDescriptor property, ValueStage stage, IChangeReason reason = null) { Check.NotNull(property, nameof(property)); return(new ChangeArgs( ChangeType.PropertyChanged, stage, Path.Empty.Append(property), reason: reason ) { ChangedProperty = property }); // TODO: Remove }
private ChangeArgs( ChangeType changeType, ValueStage stage, IVMPropertyDescriptor changedProperty, Path changedPath, IChangeReason reason ) { ChangeType = changeType; Stage = stage; ChangedProperty = changedProperty; ChangedPath = changedPath; Reason = reason; }
private ChangeArgs( ChangeType changeType, ValueStage stage, Path changedPath, IEnumerable <IViewModel> oldItems = null, IEnumerable <IViewModel> newItems = null, IChangeReason reason = null ) { ChangeType = changeType; Stage = stage; ChangedPath = changedPath; OldItems = oldItems ?? Enumerable.Empty <IViewModel>(); NewItems = newItems ?? Enumerable.Empty <IViewModel>(); Reason = reason; }
// TODO: Unify step/stage??? protected PropertyValidationSourceBehaviorBase(ValidationStep step, ValueStage stage) { _step = step; _stage = stage; }
internal static ChangeArgs ValidationResultChanged(IVMPropertyDescriptor property, ValueStage stage) { Check.NotNull(property, nameof(property)); return(new ChangeArgs( ChangeType.ValidationResultChanged, stage, Path.Empty.Append(property) )); }