diff --git a/Portable/UpdateControls.UnitTest/ContactListData/ContactList.cs b/Portable/UpdateControls.UnitTest/ContactListData/ContactList.cs index 311f7a4..8f490ff 100644 --- a/Portable/UpdateControls.UnitTest/ContactListData/ContactList.cs +++ b/Portable/UpdateControls.UnitTest/ContactListData/ContactList.cs @@ -12,6 +12,11 @@ public void AddContact(Contact contact) _contacts.Add(contact); } + public void AddContacts(IEnumerable contacts) + { + _contacts.AddRange(contacts); + } + public void DeleteContact(Contact contact) { _contacts.Remove(contact); diff --git a/Portable/UpdateControls/Collections/IndependentList.cs b/Portable/UpdateControls/Collections/IndependentList.cs index 5970326..7053c1c 100644 --- a/Portable/UpdateControls/Collections/IndependentList.cs +++ b/Portable/UpdateControls/Collections/IndependentList.cs @@ -15,7 +15,7 @@ namespace UpdateControls.Collections { public class IndependentList : IList { - private IList _list; + private List _list; private Independent _indList = new NamedIndependent(MemoizedTypeName>.GenericName()); public IndependentList() @@ -66,6 +66,12 @@ public void Add(T item) _list.Add(item); } + public void AddRange(IEnumerable items) + { + _indList.OnSet(); + _list.AddRange(items); + } + public void Clear() { _indList.OnSet(); diff --git a/Universal/UpdateControls/Collections/IndependentList.cs b/Universal/UpdateControls/Collections/IndependentList.cs index 2991f11..e9eee5b 100644 --- a/Universal/UpdateControls/Collections/IndependentList.cs +++ b/Universal/UpdateControls/Collections/IndependentList.cs @@ -15,7 +15,7 @@ namespace UpdateControls.Collections { public class IndependentList : IList { - private IList _list; + private List _list; private Independent _indList = new Independent(); public IndependentList() @@ -60,11 +60,17 @@ public T this[int index] } } - public void Add(T item) - { - _indList.OnSet(); - _list.Add(item); - } + public void Add(T item) + { + _indList.OnSet(); + _list.Add(item); + } + + public void AddRange(IEnumerable items) + { + _indList.OnSet(); + _list.AddRange(items); + } public void Clear() { diff --git a/WindowsForms/UpdateControls/Collections/IndependentList.cs b/WindowsForms/UpdateControls/Collections/IndependentList.cs index 5970326..89dc3ae 100644 --- a/WindowsForms/UpdateControls/Collections/IndependentList.cs +++ b/WindowsForms/UpdateControls/Collections/IndependentList.cs @@ -15,7 +15,7 @@ namespace UpdateControls.Collections { public class IndependentList : IList { - private IList _list; + private List _list; private Independent _indList = new NamedIndependent(MemoizedTypeName>.GenericName()); public IndependentList() @@ -60,11 +60,17 @@ public T this[int index] } } - public void Add(T item) - { - _indList.OnSet(); - _list.Add(item); - } + public void Add(T item) + { + _indList.OnSet(); + _list.Add(item); + } + + public void AddRange(IEnumerable items) + { + _indList.OnSet(); + _list.AddRange(items); + } public void Clear() {