Interface IManageableCollection
Defines the behavior of a collection that can be managed with untyped prototype methods
Namespace: PnP.Core.Model
Assembly: PnP.Core.dll
Syntax
public interface IManageableCollection
Methods
Add(Object)
Method to add a new item to the collection
Declaration
void Add(object item)
Parameters
Object
item
The 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
Declaration
void AddOrUpdate(object newItem, Predicate<object> selector)
Parameters
Object
newItem
The untyped item to add |
Predicate<Object>
selector
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
Declaration
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
Declaration
object CreateNewAndAdd()
Returns
Object
The new item, added to the collection |
Remove(Object)
Method to remove an untyped item from the collection
Declaration
bool Remove(object item)
Parameters
Object
item
The untyped item to remove |
Returns
Boolean
True if the removal is successful |