Search Results for

    Show / Hide Table of Contents
    View Source

    Class BlockModelCollection<T>

    Represents a read-only collection of block items.

    Inheritance
    object
    ReadOnlyCollection<T>
    Namespace: Umbraco.Cms.Core.Models.Blocks
    Assembly: Umbraco.Core.dll
    Syntax
    public abstract class BlockModelCollection<T> : ReadOnlyCollection<T> where T : class, IBlockReference<IPublishedElement, IPublishedElement>
    Type Parameters
    Name Description
    T

    The type of block item.

    Constructors

    View Source

    BlockModelCollection(IList<T>)

    Initializes a new instance of the BlockModelCollection<T> class.

    Declaration
    protected BlockModelCollection(IList<T> list)
    Parameters
    Type Name Description
    IList<T> list

    The list to wrap.

    Properties

    View Source

    this[Guid]

    Gets the block item with the specified content key.

    Declaration
    public T? this[Guid contentKey] { get; }
    Parameters
    Type Name Description
    Guid contentKey

    The content key.

    Property Value
    Type Description
    T

    The block item.

    View Source

    this[Udi]

    Gets the block item with the specified content UDI.

    Declaration
    public T? this[Udi contentUdi] { get; }
    Parameters
    Type Name Description
    Udi contentUdi

    The content UDI.

    Property Value
    Type Description
    T

    The block item.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX