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
| 
        System.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
| 
        System.Object
        newItem
         The untyped item to add  | 
    
| 
        Predicate<System.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
| 
        System.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
| 
        System.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
| 
        System.Object
        item
         The untyped item to remove  | 
    
Returns
| 
        System.Boolean
         True if the removal is successful  | 
    
Replace(Int32, Object)
Replaces an item in the collection with a new one
Declaration
void Replace(int itemIndex, object newItem)
  Parameters
| 
        System.Int32
        itemIndex
         The index of the item to replace within the collection  | 
    
| 
        System.Object
        newItem
         New item to replace the old one with  |