Class PropertyCollection
Represents a Collection of Property objects
Inheritance
System.Object
System.Collections.ObjectModel.Collection<
Property>
System.Collections.ObjectModel.KeyedCollection<
System.String,
Property>
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
[Serializable]
[DataContract(IsReference = true)]
public class PropertyCollection : KeyedCollection<string, Property>, IList<Property>, ICollection<Property>, IList, ICollection, IReadOnlyList<Property>, IReadOnlyCollection<Property>, IEnumerable<Property>, IEnumerable, INotifyCollectionChanged, IDeepCloneable
Constructors
PropertyCollection(IEnumerable<Property>)
Declaration
public PropertyCollection(IEnumerable<Property> properties)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<Property> |
properties |
|
Methods
ClearItems()
Declaration
protected override void ClearItems()
Contains(String)
Determines whether this collection contains a Property whose alias matches the specified PropertyType.
Declaration
public bool Contains(string propertyTypeAlias)
Parameters
Type |
Name |
Description |
System.String |
propertyTypeAlias |
Alias of the PropertyType.
|
Returns
Type |
Description |
System.Boolean |
true if the collection contains the specified alias; otherwise, false .
|
DeepClone()
Create a deep clone of this property collection
Declaration
public object DeepClone()
Returns
Type |
Description |
System.Object |
|
EnsureCleanPropertyTypes(IEnumerable<PropertyType>)
Ensures that the collection is cleared from PropertyTypes not in the list of passed in PropertyTypes
Declaration
protected void EnsureCleanPropertyTypes(IEnumerable<PropertyType> propertyTypes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<PropertyType> |
propertyTypes |
List of PropertyType
|
EnsurePropertyTypes(IEnumerable<PropertyType>)
Ensures that the collection contains Properties for the passed in PropertyTypes
Declaration
protected void EnsurePropertyTypes(IEnumerable<PropertyType> propertyTypes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<PropertyType> |
propertyTypes |
List of PropertyType
|
GetKeyForItem(Property)
Declaration
protected override string GetKeyForItem(Property item)
Parameters
Returns
Type |
Description |
System.String |
|
IndexOfKey(String)
Declaration
public int IndexOfKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int32 |
|
InsertItem(Int32, Property)
Declaration
protected override void InsertItem(int index, Property item)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property |
item |
|
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
Type |
Name |
Description |
System.Collections.Specialized.NotifyCollectionChangedEventArgs |
args |
|
RemoveItem(Int32)
Declaration
protected override void RemoveItem(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
SetItem(Int32, Property)
Declaration
protected override void SetItem(int index, Property item)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property |
item |
|
Events
CollectionChanged
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
Type |
Description |
System.Collections.Specialized.NotifyCollectionChangedEventHandler |
|