Refactor IPublishedContent.CultureDate(), .Cultures

This commit is contained in:
Stephan
2019-04-17 10:03:49 +02:00
parent 7cf13cbf94
commit e062ea8d31
17 changed files with 84 additions and 76 deletions

View File

@@ -88,7 +88,7 @@ namespace Umbraco.Core.Models.PublishedContent
/// </summary>
/// <remarks>
/// <para>For published content items, this is also the date the item was published.</para>
/// <para>This date is always global to the content item, see GetCulture().Date for the
/// <para>This date is always global to the content item, see CultureDate() for the
/// date each culture was published.</para>
/// </remarks>
DateTime UpdateDate { get; }
@@ -104,19 +104,20 @@ namespace Umbraco.Core.Models.PublishedContent
string Url(string culture = null, UrlMode mode = UrlMode.Auto);
/// <summary>
/// Gets culture infos for a culture.
/// Gets the culture date of the content item.
/// </summary>
PublishedCultureInfo GetCulture(string culture = null);
/// <param name="culture">The specific culture to get the name for. If null is used the current culture is used (Default is null).</param>
DateTime CultureDate(string culture = null);
/// <summary>
/// Gets culture infos.
/// Gets all available cultures.
/// </summary>
/// <remarks>
/// <para>Contains only those culture that are available. For a published content, these are
/// the cultures that are published. For a draft content, those that are 'available' ie
/// have a non-empty content name.</para>
/// </remarks>
IReadOnlyDictionary<string, PublishedCultureInfo> Cultures { get; }
IReadOnlyList<string> Cultures { get; }
/// <summary>
/// Gets a value indicating whether the content is draft.

View File

@@ -97,10 +97,10 @@ namespace Umbraco.Core.Models.PublishedContent
public virtual string Url(string culture = null, UrlMode mode = UrlMode.Auto) => _content.Url(culture, mode);
/// <inheritdoc />
public PublishedCultureInfo GetCulture(string culture = null) => _content.GetCulture(culture);
public DateTime CultureDate(string culture = null) => _content.CultureDate(culture);
/// <inheritdoc />
public IReadOnlyDictionary<string, PublishedCultureInfo> Cultures => _content.Cultures;
public IReadOnlyList<string> Cultures => _content.Cultures;
/// <inheritdoc />
public virtual bool IsDraft(string culture = null) => _content.IsDraft(culture);