Search Results for

    Show / Hide Table of Contents
    View Source

    Class PropertyGroupCollection

    Represents a collection of PropertyGroup objects

    Inheritance
    object
    Collection<PropertyGroup>
    KeyedCollection<string, PropertyGroup>
    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    [DataContract]
    public class PropertyGroupCollection : KeyedCollection<string, PropertyGroup>, IDeepCloneable

    Constructors

    View Source

    PropertyGroupCollection()

    Initializes a new instance of the PropertyGroupCollection class.

    Declaration
    public PropertyGroupCollection()
    View Source

    PropertyGroupCollection(IEnumerable<PropertyGroup>)

    Initializes a new instance of the PropertyGroupCollection class.

    Declaration
    public PropertyGroupCollection(IEnumerable<PropertyGroup> groups)
    Parameters
    Type Name Description
    IEnumerable<PropertyGroup> groups

    The groups.

    Methods

    View Source

    Add(PropertyGroup)

    Adds a property group to the collection.

    Declaration
    public void Add(PropertyGroup item)
    Parameters
    Type Name Description
    PropertyGroup item

    The property group to add.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when the property group does not have an alias set.

    ArgumentException

    Thrown when changing the alias would result in duplicates.

    View Source

    ClearCollectionChangedEvents()

    Clears all CollectionChanged event handlers

    Declaration
    public void ClearCollectionChangedEvents()
    View Source

    ClearItems()

    Declaration
    protected override void ClearItems()
    View Source

    Contains(int)

    Determines whether the collection contains a property group with the specified identifier.

    Declaration
    public bool Contains(int id)
    Parameters
    Type Name Description
    int id

    The identifier to search for.

    Returns
    Type Description
    bool

    true if a property group with the specified identifier exists; otherwise, false.

    View Source

    DeepClone()

    Creates a deep clone of the current object.

    Declaration
    public object DeepClone()
    Returns
    Type Description
    object

    A deep clone of the current object.

    View Source

    GetKeyForItem(PropertyGroup)

    Declaration
    protected override string GetKeyForItem(PropertyGroup item)
    Parameters
    Type Name Description
    PropertyGroup item
    Returns
    Type Description
    string
    View Source

    IndexOfKey(int)

    Gets the index of the property group with the specified identifier.

    Declaration
    public int IndexOfKey(int id)
    Parameters
    Type Name Description
    int id

    The identifier to search for.

    Returns
    Type Description
    int

    The zero-based index of the property group, or -1 if not found.

    View Source

    IndexOfKey(string)

    Gets the index of the property group with the specified alias.

    Declaration
    public int IndexOfKey(string key)
    Parameters
    Type Name Description
    string key

    The alias to search for.

    Returns
    Type Description
    int

    The zero-based index of the property group, or -1 if not found.

    View Source

    InsertItem(int, PropertyGroup)

    Declaration
    protected override void InsertItem(int index, PropertyGroup item)
    Parameters
    Type Name Description
    int index
    PropertyGroup item
    View Source

    OnCollectionChanged(NotifyCollectionChangedEventArgs)

    Raises the CollectionChanged event.

    Declaration
    protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
    Parameters
    Type Name Description
    NotifyCollectionChangedEventArgs args

    The event arguments.

    View Source

    RemoveItem(int)

    Declaration
    protected override void RemoveItem(int index)
    Parameters
    Type Name Description
    int index
    View Source

    SetItem(int, PropertyGroup)

    Declaration
    protected override void SetItem(int index, PropertyGroup item)
    Parameters
    Type Name Description
    int index
    PropertyGroup item

    Events

    View Source

    CollectionChanged

    Declaration
    public event NotifyCollectionChangedEventHandler? CollectionChanged
    Event Type
    Type Description
    NotifyCollectionChangedEventHandler
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX