2016-05-27 14:26:28 +02:00
using System ;
using System.Collections.Generic ;
2021-02-18 11:06:02 +01:00
namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource
2016-05-27 14:26:28 +02:00
{
2021-06-24 09:43:57 -06:00
/// <summary>
/// Represents everything that is specific to an edited or published content version
/// </summary>
2020-02-06 14:40:46 +01:00
public class ContentData
2016-05-27 14:26:28 +02:00
{
2021-10-19 23:11:54 +11:00
[Obsolete("Use ctor with all params, as the pros should be immutable")]
public ContentData ( )
{
2016-05-27 14:26:28 +02:00
2021-10-19 23:11:54 +11:00
}
public ContentData ( string name , string urlSegment , int versionId , DateTime versionDate , int writerId , int? templateId , bool published , IDictionary < string , PropertyData [ ] > properties , IReadOnlyDictionary < string , CultureVariation > cultureInfos )
{
Name = name ? ? throw new ArgumentNullException ( nameof ( name ) ) ;
UrlSegment = urlSegment ;
VersionId = versionId ;
VersionDate = versionDate ;
WriterId = writerId ;
TemplateId = templateId ;
Published = published ;
Properties = properties ? ? throw new ArgumentNullException ( nameof ( properties ) ) ;
CultureInfos = cultureInfos ;
}
public string Name { get ; [ Obsolete ( "Do not change this, use ctor with params and have this object immutable." ) ] set ; }
public string UrlSegment { get ; [ Obsolete ( "Do not change this, use ctor with params and have this object immutable." ) ] set ; }
public int VersionId { get ; [ Obsolete ( "Do not change this, use ctor with params and have this object immutable." ) ] set ; }
public DateTime VersionDate { get ; [ Obsolete ( "Do not change this, use ctor with params and have this object immutable." ) ] set ; }
public int WriterId { get ; [ Obsolete ( "Do not change this, use ctor with params and have this object immutable." ) ] set ; }
public int? TemplateId { get ; [ Obsolete ( "Do not change this, use ctor with params and have this object immutable." ) ] set ; }
public bool Published { get ; [ Obsolete ( "Do not change this, use ctor with params and have this object immutable." ) ] set ; }
public IDictionary < string , PropertyData [ ] > Properties { get ; [ Obsolete ( "Do not change this, use ctor with params and have this object immutable." ) ] set ; }
2018-04-28 21:57:07 +02:00
/// <summary>
/// The collection of language Id to name for the content item
/// </summary>
2021-10-19 23:11:54 +11:00
public IReadOnlyDictionary < string , CultureVariation > CultureInfos { get ; [ Obsolete ( "Do not change this, use ctor with params and have this object immutable." ) ] set ; }
2016-05-27 14:26:28 +02:00
}
}