Esempio n. 1
0
        public static DataChange <T> GetData(T[] array, IIndexOverlay overlay)
        {
            if (!overlay.ContainsIndexes)
            {
                return(new DataChange <T>());
            }
            if (overlay.LastIndex > array.Length)
            {
                throw new IndexOutOfRangeException();
            }

            DataChange <T> result = new DataChange <T>();

            foreach (var item in (overlay as IEnumerable <KeyValuePair <int, int> >))
            {
                T[] temp = new T[item.Value];
                Array.Copy(array, item.Key, temp, 0, temp.Length);
                result.AddChangedData(item.Key, array);
            }
            return(result);
        }
Esempio n. 2
0
 public void Dispose()
 {
     enume.Dispose();
     parent = null;
     index  = 0;
 }
Esempio n. 3
0
 public ChangeEnumerator(DataChange <T> parent)
 {
     this.parent = parent;
     this.enume  = parent.dataToChange.GetEnumerator();
     this.Reset();
 }