コード例 #1
0
ファイル: ProjectionBase.cs プロジェクト: Lendsum/Seeker
        /// <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);
            }
        }
コード例 #2
0
ファイル: ProjectionBase.cs プロジェクト: Lendsum/Seeker
        /// <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);
            }
        }