Interface IManageableCollection
Defines the behavior of a collection that can be managed with untyped prototype methods
public interface IManageableCollection
Methods
Add(object)
Method to add a new item to the collection
void Add(object item)
Parameters
itemobjectThe untyped item to add
AddOrUpdate(object, Predicate<object>)
Method to add a new untyped item or update an already existing one based on a selection predicate
void AddOrUpdate(object newItem, Predicate<object> selector)
Parameters
newItemobjectThe untyped item to add
selectorPredicate<object>The selection predicate for the already existing item, if any
CreateNew()
Method to create a new item of the collection, ready to be added to the same collection
object CreateNew()
Returns
- object
The new item, ready to be added to the current collection
CreateNewAndAdd()
Method to create a new typed item of the collection and immediately add it the collection
object CreateNewAndAdd()
Returns
- object
The new item, added to the collection
Remove(object)
Method to remove an untyped item from the collection
bool Remove(object item)
Parameters
itemobjectThe untyped item to remove
Returns
- bool
True if the removal is successful
Replace(int, object)
Replaces an item in the collection with a new one
void Replace(int itemIndex, object newItem)