/
IPublishedElement.cs
50 lines (40 loc) · 1.45 KB
/
IPublishedElement.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
namespace Umbraco.Cms.Core.Models.PublishedContent;
/// <summary>
/// Represents a published element.
/// </summary>
public interface IPublishedElement
{
#region ContentType
/// <summary>
/// Gets the content type.
/// </summary>
IPublishedContentType ContentType { get; }
#endregion
#region PublishedElement
/// <summary>
/// Gets the unique key of the published element.
/// </summary>
Guid Key { get; }
#endregion
#region Properties
/// <summary>
/// Gets the properties of the element.
/// </summary>
/// <remarks>
/// Contains one <c>IPublishedProperty</c> for each property defined for the content type, including
/// inherited properties. Some properties may have no value.
/// </remarks>
IEnumerable<IPublishedProperty> Properties { get; }
/// <summary>
/// Gets a property identified by its alias.
/// </summary>
/// <param name="alias">The property alias.</param>
/// <returns>The property identified by the alias.</returns>
/// <remarks>
/// <para>If the content type has no property with that alias, including inherited properties, returns <c>null</c>,</para>
/// <para>otherwise return a property -- that may have no value (ie <c>HasValue</c> is <c>false</c>).</para>
/// <para>The alias is case-insensitive.</para>
/// </remarks>
IPublishedProperty? GetProperty(string alias);
#endregion
}