public void FillTo(EntityCollectionBase <int, T> list) { int listCount = list.Count; for (int i = 0; i < this.Count; i++) { if (i >= listCount) { break; } Revertable2 <T> revertable = this.GetValue(list[i].GetKey()); if (revertable != null) { list[i].SetNewRevertableText1(revertable.Value.Text1, revertable.Value.KeywordVersion); if (revertable.OriginalText1 != null) { list[i].SetOriginalText1(revertable.OriginalText1); } list[i].SetNewRevertableText2(revertable.Value.Text2, revertable.Value.KeywordVersion); if (revertable.OriginalText2 != null) { list[i].SetOriginalText2(revertable.OriginalText2); } //list[i] = revertable.Value; } } }
public void Add(T value, string reverter1, string reverter2) { Revertable2 <T> item = new Revertable2 <T>(value, reverter1, reverter2); this.Add(item); }