ICollectionTypeConverter Interface
Identifies an object as a type converter for a collection used to control how and when items should be added.
public interface ICollectionTypeConverter
Methods
AddItem(IPropertyModel, object)
Adds the specified item into to the collection.
bool AddItem(IPropertyModel propertyModel, object item)
| Parameter | Type | Description |
|---|---|---|
| propertyModel | IPropertyModel | The IPropertyModel associated with the collection. |
| item | object | The item that should be added. |
Returns
- bool:
trueif the item was added to the collection; otherwise,false.
CanAddItem(IPropertyModel)
Gets a value indicating whether a new item can be added to the collection.
bool CanAddItem(IPropertyModel propertyModel)
| Parameter | Type | Description |
|---|---|---|
| propertyModel | IPropertyModel | The IPropertyModel associated with the collection. |
Returns
- bool:
trueif a new item can be added to the collection; otherwise,false.
CreateItem(IPropertyModel)
Creates a new item that can be added into to the collection.
object CreateItem(IPropertyModel propertyModel)
| Parameter | Type | Description |
|---|---|---|
| propertyModel | IPropertyModel | The IPropertyModel associated with the collection. |
Returns
- object:
The item that was created.