using System;
using System.Collections.Generic;
namespace Umbraco.Core.Models.PublishedContent
{
///
/// Provides an abstract base class for IPropertySet implementations that
/// wrap and extend another IPropertySet.
///
public abstract class PropertySetWrapped : IPropertySet
{
private readonly IPropertySet _content;
///
/// Initializes a new instance of the class
/// with an IPropertySet instance to wrap.
///
/// The content to wrap.
protected PropertySetWrapped(IPropertySet content)
{
_content = content;
}
///
/// Gets the wrapped content.
///
/// The wrapped content, that was passed as an argument to the constructor.
public IPropertySet 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);
}
}