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
|
bool
True if the removal is successful |