using System;
using Umbraco.Core.Exceptions;
namespace Umbraco.Core.Models.PublishedContent
{
///
/// Contains culture specific values for .
///
public class PublishedCultureInfo
{
///
/// Initializes a new instance of the class.
///
public PublishedCultureInfo(string culture, string name, DateTime date)
{
if (string.IsNullOrWhiteSpace(culture)) throw new ArgumentNullOrEmptyException(nameof(culture));
if (string.IsNullOrWhiteSpace(name)) throw new ArgumentNullOrEmptyException(nameof(name));
Culture = culture;
Name = name;
UrlSegment = name.ToUrlSegment(culture);
Date = date;
}
///
/// Gets the culture.
///
public string Culture { get; }
///
/// Gets the name of the item.
///
public string Name { get; }
///
/// Gets the url segment of the item.
///
public string UrlSegment { get; }
///
/// Gets the date associated with the culture.
///
///
/// For published culture, this is the date the culture was published. For draft
/// cultures, this is the date the culture was made available, ie the last time its
/// name changed.
///
public DateTime Date { get; }
}
}