Merge remote-tracking branch 'origin/netcore/netcore' into feature/8651-config-options-patten
# Conflicts: # src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs # src/Umbraco.ModelsBuilder.Embedded/BackOffice/ContentTypeModelValidatorBase.cs # src/Umbraco.ModelsBuilder.Embedded/BackOffice/ModelsBuilderDashboardController.cs # src/Umbraco.ModelsBuilder.Embedded/Building/ModelsGenerator.cs # src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs # src/Umbraco.ModelsBuilder.Embedded/ModelsGenerationError.cs # src/Umbraco.ModelsBuilder.Embedded/OutOfDateModelsStatus.cs # src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs # src/Umbraco.Web.BackOffice/Controllers/RedirectUrlManagementController.cs
This commit is contained in:
@@ -5,41 +5,126 @@ using Umbraco.Core.Models.PublishedContent;
|
||||
namespace Umbraco.Core.Models.Blocks
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a layout item for the Block List editor
|
||||
/// Represents a layout item for the Block List editor.
|
||||
/// </summary>
|
||||
/// <seealso cref="Umbraco.Core.Models.Blocks.IBlockReference{Umbraco.Core.Models.PublishedContent.IPublishedElement}" />
|
||||
[DataContract(Name = "block", Namespace = "")]
|
||||
public class BlockListItem : IBlockReference<IPublishedElement>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BlockListItem" /> class.
|
||||
/// </summary>
|
||||
/// <param name="contentUdi">The content UDI.</param>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="settingsUdi">The settings UDI.</param>
|
||||
/// <param name="settings">The settings.</param>
|
||||
/// <exception cref="System.ArgumentNullException">contentUdi
|
||||
/// or
|
||||
/// content</exception>
|
||||
public BlockListItem(Udi contentUdi, IPublishedElement content, Udi settingsUdi, IPublishedElement settings)
|
||||
{
|
||||
ContentUdi = contentUdi ?? throw new ArgumentNullException(nameof(contentUdi));
|
||||
ContentUdi = contentUdi ?? throw new ArgumentNullException(nameof(contentUdi));
|
||||
Content = content ?? throw new ArgumentNullException(nameof(content));
|
||||
Settings = settings; // can be null
|
||||
SettingsUdi = settingsUdi; // can be null
|
||||
SettingsUdi = settingsUdi;
|
||||
Settings = settings;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Id of the content data item
|
||||
/// Gets the content UDI.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The content UDI.
|
||||
/// </value>
|
||||
[DataMember(Name = "contentUdi")]
|
||||
public Udi ContentUdi { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The Id of the settings data item
|
||||
/// </summary>
|
||||
[DataMember(Name = "settingsUdi")]
|
||||
public Udi SettingsUdi { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The content data item referenced
|
||||
/// Gets the content.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The content.
|
||||
/// </value>
|
||||
[DataMember(Name = "content")]
|
||||
public IPublishedElement Content { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The settings data item referenced
|
||||
/// Gets the settings UDI.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The settings UDI.
|
||||
/// </value>
|
||||
[DataMember(Name = "settingsUdi")]
|
||||
public Udi SettingsUdi { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the settings.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The settings.
|
||||
/// </value>
|
||||
[DataMember(Name = "settings")]
|
||||
public IPublishedElement Settings { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a layout item with a generic content type for the Block List editor.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the content.</typeparam>
|
||||
/// <seealso cref="Umbraco.Core.Models.Blocks.IBlockReference{Umbraco.Core.Models.PublishedContent.IPublishedElement}" />
|
||||
public class BlockListItem<T> : BlockListItem
|
||||
where T : IPublishedElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BlockListItem{T}" /> class.
|
||||
/// </summary>
|
||||
/// <param name="contentUdi">The content UDI.</param>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="settingsUdi">The settings UDI.</param>
|
||||
/// <param name="settings">The settings.</param>
|
||||
public BlockListItem(Udi contentUdi, T content, Udi settingsUdi, IPublishedElement settings)
|
||||
: base(contentUdi, content, settingsUdi, settings)
|
||||
{
|
||||
Content = content;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The content.
|
||||
/// </value>
|
||||
public new T Content { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a layout item with generic content and settings types for the Block List editor.
|
||||
/// </summary>
|
||||
/// <typeparam name="TContent">The type of the content.</typeparam>
|
||||
/// <typeparam name="TSettings">The type of the settings.</typeparam>
|
||||
/// <seealso cref="Umbraco.Core.Models.Blocks.IBlockReference{Umbraco.Core.Models.PublishedContent.IPublishedElement}" />
|
||||
public class BlockListItem<TContent, TSettings> : BlockListItem<TContent>
|
||||
where TContent : IPublishedElement
|
||||
where TSettings : IPublishedElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BlockListItem{TContent, TSettings}" /> class.
|
||||
/// </summary>
|
||||
/// <param name="contentUdi">The content udi.</param>
|
||||
/// <param name="content">The content.</param>
|
||||
/// <param name="settingsUdi">The settings udi.</param>
|
||||
/// <param name="settings">The settings.</param>
|
||||
public BlockListItem(Udi contentUdi, TContent content, Udi settingsUdi, TSettings settings)
|
||||
: base(contentUdi, content, settingsUdi, settings)
|
||||
{
|
||||
Settings = settings;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the settings.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The settings.
|
||||
/// </value>
|
||||
public new TSettings Settings { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,37 @@
|
||||
namespace Umbraco.Core.Models.Blocks
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a data item reference for a Block editor implementation
|
||||
/// </summary>
|
||||
/// <typeparam name="TSettings"></typeparam>
|
||||
/// <remarks>
|
||||
/// see: https://github.com/umbraco/rfcs/blob/907f3758cf59a7b6781296a60d57d537b3b60b8c/cms/0011-block-data-structure.md#strongly-typed
|
||||
/// </remarks>
|
||||
public interface IBlockReference<TSettings> : IBlockReference
|
||||
{
|
||||
TSettings Settings { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a data item reference for a Block Editor implementation
|
||||
/// Represents a data item reference for a Block Editor implementation.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// see: https://github.com/umbraco/rfcs/blob/907f3758cf59a7b6781296a60d57d537b3b60b8c/cms/0011-block-data-structure.md#strongly-typed
|
||||
/// See: https://github.com/umbraco/rfcs/blob/907f3758cf59a7b6781296a60d57d537b3b60b8c/cms/0011-block-data-structure.md#strongly-typed
|
||||
/// </remarks>
|
||||
public interface IBlockReference
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the content UDI.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The content UDI.
|
||||
/// </value>
|
||||
Udi ContentUdi { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a data item reference with settings for a Block editor implementation.
|
||||
/// </summary>
|
||||
/// <typeparam name="TSettings">The type of the settings.</typeparam>
|
||||
/// <remarks>
|
||||
/// See: https://github.com/umbraco/rfcs/blob/907f3758cf59a7b6781296a60d57d537b3b60b8c/cms/0011-block-data-structure.md#strongly-typed
|
||||
/// </remarks>
|
||||
public interface IBlockReference<TSettings> : IBlockReference
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the settings.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The settings.
|
||||
/// </value>
|
||||
TSettings Settings { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Runtime.Serialization;
|
||||
|
||||
namespace Umbraco.Core.Models
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of property values.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user