View Source
Class PropertyCollection
Represents a collection of property values.
Inheritance
System.Object
System.Collections.ObjectModel.Collection<
Property>
System.Collections.ObjectModel.KeyedCollection<
System.String,
Property>
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
View Source
PropertyCollection(IEnumerable<Property>)
Declaration
public PropertyCollection(IEnumerable<Property> properties)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<Property> |
properties |
|
Methods
View Source
ClearCollectionChangedEvents()
Declaration
public void ClearCollectionChangedEvents()
View Source
ClearItems()
Declaration
protected override void ClearItems()
View Source
DeepClone()
Declaration
public object DeepClone()
Returns
Type |
Description |
System.Object |
|
View Source
EnsureCleanPropertyTypes(IEnumerable<PropertyType>)
Ensures that the collection does not contain properties not in the specified property types.
Declaration
protected void EnsureCleanPropertyTypes(IEnumerable<PropertyType> propertyTypes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<PropertyType> |
propertyTypes |
|
View Source
EnsurePropertyTypes(IEnumerable<PropertyType>)
Ensures that the collection contains properties for the specified property types.
Declaration
protected void EnsurePropertyTypes(IEnumerable<PropertyType> propertyTypes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<PropertyType> |
propertyTypes |
|
View Source
GetKeyForItem(Property)
Declaration
protected override string GetKeyForItem(Property item)
Parameters
Returns
Type |
Description |
System.String |
|
View Source
IndexOfKey(String)
Gets the index for a specified property alias.
Declaration
public int IndexOfKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Int32 |
|
View Source
InsertItem(Int32, Property)
Inserts the specified property at the specified index.
Declaration
protected override void InsertItem(int index, Property property)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property |
property |
|
View Source
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
Parameters
Type |
Name |
Description |
System.Collections.Specialized.NotifyCollectionChangedEventArgs |
args |
|
View Source
RemoveItem(Int32)
Removes the property at the specified index.
Declaration
protected override void RemoveItem(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
View Source
SetItem(Int32, Property)
Replaces the property at the specified index with the specified property.
Declaration
protected override void SetItem(int index, Property property)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Property |
property |
|
View Source
TryGetValue(String, out Property)
Declaration
public bool TryGetValue(string propertyTypeAlias, out Property property)
Parameters
Type |
Name |
Description |
System.String |
propertyTypeAlias |
|
Property |
property |
|
Returns
Type |
Description |
System.Boolean |
|
Events
View Source
CollectionChanged
Occurs when the collection changes.
Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
Type |
Description |
System.Collections.Specialized.NotifyCollectionChangedEventHandler |
|