Search Results for

    Show / Hide Table of Contents
    View Source

    Class PropertyTypeCollection

    Represents a collection of IPropertyType objects.

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

    Constructors

    View Source

    PropertyTypeCollection(bool)

    Declaration
    public PropertyTypeCollection(bool supportsPublishing)
    Parameters
    Type Name Description
    bool supportsPublishing
    View Source

    PropertyTypeCollection(bool, IEnumerable<IPropertyType>)

    Declaration
    public PropertyTypeCollection(bool supportsPublishing, IEnumerable<IPropertyType> properties)
    Parameters
    Type Name Description
    bool supportsPublishing
    IEnumerable<IPropertyType> properties

    Properties

    View Source

    IsReadOnly

    Gets a value indicating whether the System.Collections.Generic.ICollection<T> is read-only.

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    bool

    true if the System.Collections.Generic.ICollection<T> is read-only; otherwise, false.

    View Source

    SupportsPublishing

    Declaration
    public bool SupportsPublishing { get; }
    Property Value
    Type Description
    bool

    Methods

    View Source

    Add(IPropertyType)

    Adds an item to the System.Collections.Generic.ICollection<T>.

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

    The object to add to the System.Collections.Generic.ICollection<T>.

    Exceptions
    Type Condition
    NotSupportedException

    The System.Collections.Generic.ICollection<T> is read-only.

    View Source

    ClearCollectionChangedEvents()

    Clears all CollectionChanged event handlers

    Declaration
    public void ClearCollectionChangedEvents()
    View Source

    ClearItems()

    Removes all elements from the System.Collections.ObjectModel.KeyedCollection<TKey, TItem>.

    Declaration
    protected override void ClearItems()
    View Source

    Contains(string)

    Determines whether this collection contains a Property whose alias matches the specified PropertyType.

    Declaration
    public bool Contains(string propertyAlias)
    Parameters
    Type Name Description
    string propertyAlias

    Alias of the PropertyType.

    Returns
    Type Description
    bool

    true if the collection contains the specified alias; otherwise, false.

    View Source

    DeepClone()

    Declaration
    public object DeepClone()
    Returns
    Type Description
    object
    View Source

    GetKeyForItem(IPropertyType)

    When implemented in a derived class, extracts the key from the specified element.

    Declaration
    protected override string GetKeyForItem(IPropertyType item)
    Parameters
    Type Name Description
    IPropertyType item

    The element from which to extract the key.

    Returns
    Type Description
    string

    The key for the specified element.

    View Source

    IndexOfKey(string)

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

    InsertItem(int, IPropertyType)

    Inserts an element into the System.Collections.ObjectModel.KeyedCollection<TKey, TItem> at the specified index.

    Declaration
    protected override void InsertItem(int index, IPropertyType item)
    Parameters
    Type Name Description
    int index

    The zero-based index at which item should be inserted.

    IPropertyType item

    The object to insert.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException
       <code class="paramref">index</code> is less than 0.
    

    -or-

    index is greater than System.Collections.ObjectModel.Collection<T>.Count.

    View Source

    OnCollectionChanged(NotifyCollectionChangedEventArgs)

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

    RemoveItem(int)

    Removes the element at the specified index of the System.Collections.ObjectModel.KeyedCollection<TKey, TItem>.

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

    The index of the element to remove.

    View Source

    RemoveItem(string)

    Declaration
    public bool RemoveItem(string propertyTypeAlias)
    Parameters
    Type Name Description
    string propertyTypeAlias
    Returns
    Type Description
    bool
    View Source

    SetItem(int, IPropertyType)

    Replaces the item at the specified index with the specified item.

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

    The zero-based index of the item to be replaced.

    IPropertyType item

    The new item.

    Events

    View Source

    CollectionChanged

    Occurs when the collection changes.

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