/// <summary> /// Remotes the item (and the reverse too) /// </summary> /// <param name="item">The item.</param> protected void RemoveItem(T item) { var newElement = new ProjectionItem <T>(item, ProjectionItemActionEnum.Delete); this.Work.AddModifiedProjectionItem(newElement); if (this.ReverseEnabled) { T reverseItem = ReverseItem(item); var newReverseElement = new ProjectionItem <T>(reverseItem, ProjectionItemActionEnum.Delete); this.Work.AddModifiedProjectionItem(newReverseElement); } }
/// <summary> /// Adds the or replace item. /// </summary> /// <param name="item">The item.</param> protected void AddOrReplaceItem(T item) { var newElement = new ProjectionItem <T>(item, ProjectionItemActionEnum.UpdateOrNew); this.Work.AddModifiedProjectionItem(newElement); if (this.ReverseEnabled) { T reverseItem = ReverseItem(item); var newReverseElement = new ProjectionItem <T>(reverseItem, ProjectionItemActionEnum.UpdateOrNew); this.Work.AddModifiedProjectionItem(newReverseElement); } }