Search Results for

    Show / Hide Table of Contents
    View Source

    Class PublishedElementWrapped

    Provides an abstract base class for IPublishedElement implementations that wrap and extend another IPublishedElement.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Models.PublishedContent
    Assembly: Umbraco.Core.dll
    Syntax
    public abstract class PublishedElementWrapped : IPublishedElement

    Constructors

    View Source

    PublishedElementWrapped(IPublishedElement, IPublishedValueFallback)

    Initializes a new instance of the PublishedElementWrapped class with an IPublishedElement instance to wrap.

    Declaration
    protected PublishedElementWrapped(IPublishedElement content, IPublishedValueFallback publishedValueFallback)
    Parameters
    Type Name Description
    IPublishedElement content

    The content to wrap.

    IPublishedValueFallback publishedValueFallback

    The published value fallback.

    Properties

    View Source

    ContentType

    Gets the content type.

    Declaration
    public IPublishedContentType ContentType { get; }
    Property Value
    Type Description
    IPublishedContentType
    View Source

    Key

    Gets the unique key of the published element.

    Declaration
    public Guid Key { get; }
    Property Value
    Type Description
    Guid
    View Source

    Properties

    Gets the properties of the element.

    Declaration
    public IEnumerable<IPublishedProperty> Properties { get; }
    Property Value
    Type Description
    IEnumerable<IPublishedProperty>
    Remarks

    Contains one IPublishedProperty for each property defined for the content type, including inherited properties. Some properties may have no value.

    Methods

    View Source

    GetProperty(String)

    Gets a property identified by its alias.

    Declaration
    public IPublishedProperty GetProperty(string alias)
    Parameters
    Type Name Description
    System.String alias

    The property alias.

    Returns
    Type Description
    IPublishedProperty

    The property identified by the alias.

    Remarks

    If the content type has no property with that alias, including inherited properties, returns null,

    otherwise return a property -- that may have no value (ie HasValue is false).

    The alias is case-insensitive.

    View Source

    Unwrap()

    Gets the wrapped content.

    Declaration
    public IPublishedElement Unwrap()
    Returns
    Type Description
    IPublishedElement

    The wrapped content, that was passed as an argument to the constructor.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • PublishedElementWrapped(IPublishedElement, IPublishedValueFallback)
    • Properties
      • ContentType
      • Key
      • Properties
    • Methods
      • GetProperty(String)
      • Unwrap()
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX