Ejemplo n.º 1
0
        /// <summary>
        /// Returns the changes made to the derived sequence as a list of IndexedItem&lt;UpdatedSequenceItem&gt;.
        /// Note that this method returns internal indices and not the current indices.
        /// In case of insert and replace operations UpdatedSequenceItem will contain sequence item which
        /// was inserted or replaced. For remove operation it will contain removed sequence item.
        /// </summary>
        /// <returns>List of IndexedItem&lt;UpdatedSequenceItem&gt;.</returns>
        public IList <IndexedItem <UpdatedSequenceItem> > GetUpdatedItems()
        {
            List <IndexedItem <UpdatedSequenceItem> > seqItems = new List <IndexedItem <UpdatedSequenceItem> >();

            foreach (int key in _updatedItems.Keys)
            {
                if (UseEncoding)
                {
                    IndexedItem <UpdatedSequenceItem> tmp = new IndexedItem <UpdatedSequenceItem>(key, new UpdatedSequenceItem(_updatedItems[key]));
                    tmp.Item.SequenceItem = Encoding.LookupBySymbol(tmp.Item.SequenceItem.Symbol);
                    seqItems.Add(tmp);
                }
                else
                {
                    seqItems.Add(new IndexedItem <UpdatedSequenceItem>(key, new UpdatedSequenceItem(_updatedItems[key])));
                }
            }

            return(seqItems);
        }