using System; using System.Collections.Generic; namespace Umbraco.Core.Models.PublishedContent { /// /// Provides an abstract base class for IPublishedElement implementations that /// wrap and extend another IPublishedElement. /// public abstract class PublishedElementWrapped : IPublishedElement { private readonly IPublishedElement _content; /// /// Initializes a new instance of the class /// with an IPublishedElement instance to wrap. /// /// The content to wrap. protected PublishedElementWrapped(IPublishedElement content) { _content = content; } /// /// Gets the wrapped content. /// /// The wrapped content, that was passed as an argument to the constructor. public IPublishedElement Unwrap() => _content; /// public PublishedContentType ContentType => _content.ContentType; /// public Guid Key => _content.Key; /// public IEnumerable Properties => _content.Properties; /// public IPublishedProperty GetProperty(string alias) => _content.GetProperty(alias); } }