/// <summary> /// Notifies that the item was removed. /// </summary> /// <typeparam name="TProperty">The type of the property.</typeparam> /// <param name="sourceEntity">The source entity.</param> /// <param name="propertyExpression">The property expression.</param> /// <param name="oldItem">The old item.</param> public virtual void NotifyItemRemoved <TProperty> ( IEntity sourceEntity, Expression <Func <TProperty> > propertyExpression, object oldItem) { InitializeServices(); var propertyName = PropertyUtil.ExtractPropertyName(propertyExpression); var aggregateChangedEventArgs = new AggregateChangedEventArgs( this, sourceEntity, propertyName, AggregateChangedType.CollectionItemRemoved, oldItem); AggregateChanged(this, aggregateChangedEventArgs); }
/// <summary> /// Notifies that the property changed. /// </summary> /// <typeparam name="TProperty">The type of the property.</typeparam> /// <param name="sourceEntity">The source entity.</param> /// <param name="propertyExpression">The property expression.</param> /// <param name="oldValue">The old value.</param> /// <param name="newValue">The new value.</param> public virtual void NotifyPropertyChanged <TProperty> ( IEntity sourceEntity, Expression <Func <TProperty> > propertyExpression, object oldValue, object newValue) { InitializeServices(); var propertyName = PropertyUtil.ExtractPropertyName(propertyExpression); var aggregateChangedEventArgs = new AggregateChangedEventArgs( this, sourceEntity, propertyName, oldValue, newValue); AggregateChanged(this, aggregateChangedEventArgs); }