View Source
  Class PropertyCollection
  
  Represents a collection of property values.
    Inheritance
      System.Object
      System.Collections.ObjectModel.Collection<
IProperty>
 
      System.Collections.ObjectModel.KeyedCollection<
System.String, 
IProperty>
 
      
   
  
  Assembly: Umbraco.Core.dll
  Syntax
  
    [DataContract(IsReference = true)]
public class PropertyCollection : KeyedCollection<string, IProperty>, IList<IProperty>, ICollection<IProperty>, IReadOnlyList<IProperty>, IReadOnlyCollection<IProperty>, IEnumerable<IProperty>, IList, ICollection, IEnumerable, IPropertyCollection, IDeepCloneable, INotifyCollectionChanged
   
  Constructors
  
  
    View Source
  
  PropertyCollection()
  
  
  Declaration
  
    public PropertyCollection()
   
  
    View Source
  
  PropertyCollection(IEnumerable<IProperty>)
  
  
  Declaration
  
    public PropertyCollection(IEnumerable<IProperty> properties)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | IEnumerable<IProperty> | properties |  | 
    
  
  Methods
  
  
    View Source
  
  Add(IProperty)
  Adds or updates a property.
Declaration
  
    public void Add(IProperty property)
   
  Parameters
  
  
    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<IPropertyType>)
  Ensures that the collection does not contain properties not in the specified property types.
Declaration
  
    public void EnsureCleanPropertyTypes(IEnumerable<IPropertyType> propertyTypes)
   
  Parameters
  
  
    View Source
  
  EnsurePropertyTypes(IEnumerable<IPropertyType>)
  Ensures that the collection contains properties for the specified property types.
Declaration
  
    public void EnsurePropertyTypes(IEnumerable<IPropertyType> propertyTypes)
   
  Parameters
  
  
    View Source
  
  GetKeyForItem(IProperty)
  
  
  Declaration
  
    protected override string GetKeyForItem(IProperty item)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
    View Source
  
  InsertItem(Int32, IProperty)
  Inserts the specified property at the specified index.
Declaration
  
    protected override void InsertItem(int index, IProperty property)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | index |  | 
      
        | IProperty | 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, IProperty)
  Replaces the property at the specified index with the specified property.
Declaration
  
    protected override void SetItem(int index, IProperty property)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | index |  | 
      
        | IProperty | property |  | 
    
  
  
    View Source
  
  TryGetValue(String, out IProperty)
  
  
  Declaration
  
    public bool TryGetValue(string propertyTypeAlias, out IProperty property)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.String | propertyTypeAlias |  | 
      
        | IProperty | 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 |  |