diff --git a/src/Umbraco.Cms.Targets/Umbraco.Cms.Targets.csproj b/src/Umbraco.Cms.Targets/Umbraco.Cms.Targets.csproj index 056eb09513..922be06acc 100644 --- a/src/Umbraco.Cms.Targets/Umbraco.Cms.Targets.csproj +++ b/src/Umbraco.Cms.Targets/Umbraco.Cms.Targets.csproj @@ -50,4 +50,12 @@ + + + + + + + + diff --git a/src/Umbraco.Cms.Targets/buildTransitive/Umbraco.Cms.Targets.props b/src/Umbraco.Cms.Targets/buildTransitive/Umbraco.Cms.Targets.props index 6168686bcb..b79d9f9a4b 100644 --- a/src/Umbraco.Cms.Targets/buildTransitive/Umbraco.Cms.Targets.props +++ b/src/Umbraco.Cms.Targets/buildTransitive/Umbraco.Cms.Targets.props @@ -5,7 +5,7 @@ $(DefaultItemExcludes);umbraco\Logs\** $(DefaultItemExcludes);wwwroot\media\** - + diff --git a/src/Umbraco.Cms/Umbraco.Cms.csproj b/src/Umbraco.Cms/Umbraco.Cms.csproj index e1a0e2665c..1ff6e848ad 100644 --- a/src/Umbraco.Cms/Umbraco.Cms.csproj +++ b/src/Umbraco.Cms/Umbraco.Cms.csproj @@ -1,4 +1,4 @@ - + Umbraco CMS Installs Umbraco CMS with all default dependencies in your ASP.NET Core project. @@ -12,4 +12,12 @@ + + + + + + + + diff --git a/src/Umbraco.Core/Constants-Marketplace.cs b/src/Umbraco.Core/Constants-Marketplace.cs index 6d5abb38e7..38cf282b74 100644 --- a/src/Umbraco.Core/Constants-Marketplace.cs +++ b/src/Umbraco.Core/Constants-Marketplace.cs @@ -7,6 +7,6 @@ public static partial class Constants /// public static class Marketplace { - public const string Url = "https://dev.marketplace.umbraco.com"; + public const string Url = "https://marketplace.umbraco.com"; } } diff --git a/src/Umbraco.Core/Deploy/DataTypeConfigurationConnectorExtensions.cs b/src/Umbraco.Core/Deploy/DataTypeConfigurationConnectorExtensions.cs new file mode 100644 index 0000000000..dbd501d277 --- /dev/null +++ b/src/Umbraco.Core/Deploy/DataTypeConfigurationConnectorExtensions.cs @@ -0,0 +1,48 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// Extension methods adding backwards-compatability between and . +/// +/// +/// These extension methods will be removed in Umbraco 13. +/// +public static class DataTypeConfigurationConnectorExtensions +{ + /// + /// Gets the artifact configuration value corresponding to a data type configuration and gather dependencies. + /// + /// The connector. + /// The data type. + /// The dependencies. + /// The context cache. + /// + /// The artifact configuration value. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static string? ToArtifact(this IDataTypeConfigurationConnector connector, IDataType dataType, ICollection dependencies, IContextCache contextCache) + => connector is IDataTypeConfigurationConnector2 connector2 + ? connector2.ToArtifact(dataType, dependencies, contextCache) + : connector.ToArtifact(dataType, dependencies); + + /// + /// Gets the data type configuration corresponding to an artifact configuration value. + /// + /// The connector. + /// The data type. + /// The artifact configuration value. + /// The context cache. + /// + /// The data type configuration. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static object? FromArtifact(this IDataTypeConfigurationConnector connector, IDataType dataType, string? configuration, IContextCache contextCache) + => connector is IDataTypeConfigurationConnector2 connector2 + ? connector2.FromArtifact(dataType, configuration, contextCache) + : connector.FromArtifact(dataType, configuration); +} diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs index 506d1f5745..36302efd07 100644 --- a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs +++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs @@ -27,20 +27,8 @@ public interface IDataTypeConfigurationConnector /// /// The artifact configuration value. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - string? ToArtifact(IDataType dataType, ICollection dependencies) - => ToArtifact(dataType, dependencies, PassThroughCache.Instance); - - /// - /// Gets the artifact configuration value corresponding to a data type configuration and gather dependencies. - /// - /// The data type. - /// The dependencies. - /// The context cache. - /// - /// The artifact configuration value. - /// - string? ToArtifact(IDataType dataType, ICollection dependencies, IContextCache contextCache); + [Obsolete($"Implement {nameof(IDataTypeConfigurationConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? ToArtifact(IDataType dataType, ICollection dependencies); /// /// Gets the data type configuration corresponding to an artifact configuration value. @@ -50,18 +38,6 @@ public interface IDataTypeConfigurationConnector /// /// The data type configuration. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - object? FromArtifact(IDataType dataType, string? configuration) - => FromArtifact(dataType, configuration, PassThroughCache.Instance); - - /// - /// Gets the data type configuration corresponding to an artifact configuration value. - /// - /// The data type. - /// The artifact configuration value. - /// The context cache. - /// - /// The data type configuration. - /// - object? FromArtifact(IDataType dataType, string? configuration, IContextCache contextCache); + [Obsolete($"Implement {nameof(IDataTypeConfigurationConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + object? FromArtifact(IDataType dataType, string? configuration); } diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector2.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector2.cs new file mode 100644 index 0000000000..772bc35dc4 --- /dev/null +++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector2.cs @@ -0,0 +1,56 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// +/// This interface will be merged back into and removed in Umbraco 13. +/// +public interface IDataTypeConfigurationConnector2 : IDataTypeConfigurationConnector +{ + /// + /// Gets the artifact configuration value corresponding to a data type configuration and gather dependencies. + /// + /// The data type. + /// The dependencies. + /// + /// The artifact configuration value. + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? IDataTypeConfigurationConnector.ToArtifact(IDataType dataType, ICollection dependencies) + => ToArtifact(dataType, dependencies, PassThroughCache.Instance); + + /// + /// Gets the artifact configuration value corresponding to a data type configuration and gather dependencies. + /// + /// The data type. + /// The dependencies. + /// The context cache. + /// + /// The artifact configuration value. + /// + string? ToArtifact(IDataType dataType, ICollection dependencies, IContextCache contextCache); + + /// + /// Gets the data type configuration corresponding to an artifact configuration value. + /// + /// The data type. + /// The artifact configuration value. + /// + /// The data type configuration. + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + object? IDataTypeConfigurationConnector.FromArtifact(IDataType dataType, string? configuration) + => FromArtifact(dataType, configuration, PassThroughCache.Instance); + + /// + /// Gets the data type configuration corresponding to an artifact configuration value. + /// + /// The data type. + /// The artifact configuration value. + /// The context cache. + /// + /// The data type configuration. + /// + object? FromArtifact(IDataType dataType, string? configuration, IContextCache contextCache); +} diff --git a/src/Umbraco.Core/Deploy/IServiceConnector.cs b/src/Umbraco.Core/Deploy/IServiceConnector.cs index b4f530fb35..adf4c57502 100644 --- a/src/Umbraco.Core/Deploy/IServiceConnector.cs +++ b/src/Umbraco.Core/Deploy/IServiceConnector.cs @@ -15,19 +15,8 @@ public interface IServiceConnector : IDiscoverable /// /// The corresponding artifact, or null. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - IArtifact? GetArtifact(Udi udi) - => GetArtifact(udi, PassThroughCache.Instance); - - /// - /// Gets an artifact. - /// - /// The entity identifier of the artifact. - /// The context cache. - /// - /// The corresponding artifact, or null. - /// - IArtifact? GetArtifact(Udi udi, IContextCache contextCache); + [Obsolete($"Implement {nameof(IServiceConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + IArtifact? GetArtifact(Udi udi); /// /// Gets an artifact. @@ -36,19 +25,8 @@ public interface IServiceConnector : IDiscoverable /// /// The corresponding artifact. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - IArtifact GetArtifact(object entity) - => GetArtifact(entity, PassThroughCache.Instance); - - /// - /// Gets an artifact. - /// - /// The entity. - /// The context cache. - /// - /// The corresponding artifact. - /// - IArtifact GetArtifact(object entity, IContextCache contextCache); + [Obsolete($"Implement {nameof(IServiceConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + IArtifact GetArtifact(object entity); /// /// Initializes processing for an artifact. diff --git a/src/Umbraco.Core/Deploy/IServiceConnector2.cs b/src/Umbraco.Core/Deploy/IServiceConnector2.cs new file mode 100644 index 0000000000..6c1558a956 --- /dev/null +++ b/src/Umbraco.Core/Deploy/IServiceConnector2.cs @@ -0,0 +1,38 @@ +namespace Umbraco.Cms.Core.Deploy; + +/// +/// +/// This interface will be merged back into and removed in Umbraco 13. +/// +public interface IServiceConnector2 : IServiceConnector +{ + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + IArtifact? IServiceConnector.GetArtifact(Udi udi) + => GetArtifact(udi, PassThroughCache.Instance); + + /// + /// Gets an artifact. + /// + /// The entity identifier of the artifact. + /// The context cache. + /// + /// The corresponding artifact, or null. + /// + IArtifact? GetArtifact(Udi udi, IContextCache contextCache); + + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + IArtifact IServiceConnector.GetArtifact(object entity) + => GetArtifact(entity, PassThroughCache.Instance); + + /// + /// Gets an artifact. + /// + /// The entity. + /// The context cache. + /// + /// The corresponding artifact. + /// + IArtifact GetArtifact(object entity, IContextCache contextCache); +} diff --git a/src/Umbraco.Core/Deploy/IValueConnector.cs b/src/Umbraco.Core/Deploy/IValueConnector.cs index 9f3b17f71c..fe28e41017 100644 --- a/src/Umbraco.Core/Deploy/IValueConnector.cs +++ b/src/Umbraco.Core/Deploy/IValueConnector.cs @@ -29,21 +29,8 @@ public interface IValueConnector /// /// The deploy property value. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - string? ToArtifact(object? value, IPropertyType propertyType, ICollection dependencies) - => ToArtifact(value, propertyType, dependencies, PassThroughCache.Instance); - - /// - /// Gets the deploy property value corresponding to a content property value, and gather dependencies. - /// - /// The content property value. - /// The value property type - /// The content dependencies. - /// The context cache. - /// - /// The deploy property value. - /// - string? ToArtifact(object? value, IPropertyType propertyType, ICollection dependencies, IContextCache contextCache); + [Obsolete($"Implement {nameof(IValueConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? ToArtifact(object? value, IPropertyType propertyType, ICollection dependencies); /// /// Gets the content property value corresponding to a deploy property value. @@ -54,19 +41,6 @@ public interface IValueConnector /// /// The content property value. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - object? FromArtifact(string? value, IPropertyType propertyType, object? currentValue) - => FromArtifact(value, propertyType, currentValue, PassThroughCache.Instance); - - /// - /// Gets the content property value corresponding to a deploy property value. - /// - /// The deploy property value. - /// The value property type - /// The current content property value. - /// The context cache. - /// - /// The content property value. - /// - object? FromArtifact(string? value, IPropertyType propertyType, object? currentValue, IContextCache contextCache); + [Obsolete($"Implement {nameof(IValueConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + object? FromArtifact(string? value, IPropertyType propertyType, object? currentValue); } diff --git a/src/Umbraco.Core/Deploy/IValueConnector2.cs b/src/Umbraco.Core/Deploy/IValueConnector2.cs new file mode 100644 index 0000000000..a0c99dca06 --- /dev/null +++ b/src/Umbraco.Core/Deploy/IValueConnector2.cs @@ -0,0 +1,44 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// +/// This interface will be merged back into and removed in Umbraco 13. +/// +public interface IValueConnector2 : IValueConnector +{ + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? IValueConnector.ToArtifact(object? value, IPropertyType propertyType, ICollection dependencies) + => ToArtifact(value, propertyType, dependencies, PassThroughCache.Instance); + + /// + /// Gets the deploy property value corresponding to a content property value, and gather dependencies. + /// + /// The content property value. + /// The value property type + /// The content dependencies. + /// The context cache. + /// + /// The deploy property value. + /// + string? ToArtifact(object? value, IPropertyType propertyType, ICollection dependencies, IContextCache contextCache); + + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + object? IValueConnector.FromArtifact(string? value, IPropertyType propertyType, object? currentValue) + => FromArtifact(value, propertyType, currentValue, PassThroughCache.Instance); + + /// + /// Gets the content property value corresponding to a deploy property value. + /// + /// The deploy property value. + /// The value property type + /// The current content property value. + /// The context cache. + /// + /// The content property value. + /// + object? FromArtifact(string? value, IPropertyType propertyType, object? currentValue, IContextCache contextCache); +} diff --git a/src/Umbraco.Core/Deploy/ServiceConnectorExtensions.cs b/src/Umbraco.Core/Deploy/ServiceConnectorExtensions.cs new file mode 100644 index 0000000000..0d0000f97c --- /dev/null +++ b/src/Umbraco.Core/Deploy/ServiceConnectorExtensions.cs @@ -0,0 +1,44 @@ +namespace Umbraco.Cms.Core.Deploy; + +/// +/// Extension methods adding backwards-compatability between and . +/// +/// +/// These extension methods will be removed in Umbraco 13. +/// +public static class ServiceConnectorExtensions +{ + /// + /// Gets an artifact. + /// + /// The connector. + /// The entity identifier of the artifact. + /// The context cache. + /// + /// The corresponding artifact, or null. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static IArtifact? GetArtifact(this IServiceConnector connector, Udi udi, IContextCache contextCache) + => connector is IServiceConnector2 connector2 + ? connector2.GetArtifact(udi, contextCache) + : connector.GetArtifact(udi); + + /// + /// Gets an artifact. + /// + /// The connector. + /// The entity. + /// The context cache. + /// + /// The corresponding artifact. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static IArtifact GetArtifact(this IServiceConnector connector, object entity, IContextCache contextCache) + => connector is IServiceConnector2 connector2 + ? connector2.GetArtifact(entity, contextCache) + : connector.GetArtifact(entity); +} diff --git a/src/Umbraco.Core/Deploy/ValueConnectorExtensions.cs b/src/Umbraco.Core/Deploy/ValueConnectorExtensions.cs new file mode 100644 index 0000000000..eadcee55e0 --- /dev/null +++ b/src/Umbraco.Core/Deploy/ValueConnectorExtensions.cs @@ -0,0 +1,50 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// Extension methods adding backwards-compatability between and . +/// +/// +/// These extension methods will be removed in Umbraco 13. +/// +public static class ValueConnectorExtensions +{ + /// + /// Gets the artifact value corresponding to a property value and gather dependencies. + /// + /// The connector. + /// The property value. + /// The property type. + /// The dependencies. + /// The context cache. + /// + /// The artifact value. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static string? ToArtifact(this IValueConnector connector, object? value, IPropertyType propertyType, ICollection dependencies, IContextCache contextCache) + => connector is IValueConnector2 connector2 + ? connector2.ToArtifact(value, propertyType, dependencies, contextCache) + : connector.ToArtifact(value, propertyType, dependencies); + + /// + /// Gets the property value corresponding to an artifact value. + /// + /// The connector. + /// The artifact value. + /// The property type. + /// The current property value. + /// The context cache. + /// + /// The property value. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static object? FromArtifact(this IValueConnector connector, string? value, IPropertyType propertyType, object? currentValue, IContextCache contextCache) + => connector is IValueConnector2 connector2 + ? connector2.FromArtifact(value, propertyType, currentValue, contextCache) + : connector.FromArtifact(value, propertyType, currentValue); +} diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en.xml index 6f99a1020f..af7b39849c 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/en.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/en.xml @@ -2784,7 +2784,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Allow in root Make this block available in the root of the layout. Allow in areas - Make this block available within other Blocks. + Make this block available by default within the areas of other Blocks (unless explicit permissions are set for these areas). When empty all Blocks allowed for Areas can be created. Areas Grid Columns for Areas diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml index 65ef7b9f72..4678acad16 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml @@ -2887,7 +2887,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Allow in root Make this block available in the root of the layout. Allow in areas - Make this block available within other Blocks. + Make this block available by default within the areas of other Blocks (unless explicit permissions are set for these areas). When empty all Blocks allowed for Areas can be created. Areas Grid Columns for Areas diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml b/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml index e19ef083e5..b2cbb5bda0 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml @@ -2520,6 +2520,38 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Eigenschap '%0%' gebruikt editor '%1%' die niet ondersteund wordt in blokken. + Geef focus aan het container blok + Identificatie + Validatie + %0% moet minimaal %2% keer aanwezig zijn.]]> + %0%mag maximaal %3% keer aanwezig zijn.]]> + Hoeveelheid blokken + Sta alleen specifiek bloktype toe + Toegestane bloktypes + Definieer de type blokken die zijn toegestaan in dit gebied, en optioneel hoeveel van ieder type aanwezig moet zijn. + Weet je zeker dat je dit gebied wilt verwijderen? + Alle blokken op dit moment aangemaakt binnen dit gebied zullen worden verwijderd. + Lay-out opties + Structuur + Afmetingen + Definiëer een of meer afmetingen, dit maakt het mogelijk blokken te vergroten/verkleinen + Beschikbare kolommen + Definieer de verschillende aantal kolombreedtes dat dit blok mag in nemen. Dit voorkomt niet dat blokken in gebieden met kleine kolombreedtes kan worden geplaatst. + Beschikbare rijen + Definiëer de verschillende aantal rijen dat dit blok mag innemen. + Sta toe in root + Maak dit blok beschikbaar in de root van de lay-out + Sta toe in gebieden + Blok + Blokken + Instellingen + Maak dit blok standaard beschikbaar binnen de gebieden van andere blokken (behalve wanneer expliciete rechten zijn gezet voor deze gebieden). + Gebieden + Gebieden + Geadvanceerd + Rechten + Configureer gebied + Verwijder gebied Wat zijn Inhoudssjablonen? diff --git a/src/Umbraco.Infrastructure/Deploy/GridCellValueConnectorExtensions.cs b/src/Umbraco.Infrastructure/Deploy/GridCellValueConnectorExtensions.cs new file mode 100644 index 0000000000..fec3c07e3c --- /dev/null +++ b/src/Umbraco.Infrastructure/Deploy/GridCellValueConnectorExtensions.cs @@ -0,0 +1,51 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// Extension methods adding backwards-compatability between and . +/// +/// +/// These extension methods will be removed in Umbraco 13. +/// +public static class GridCellValueConnectorExtensions +{ + /// + /// Gets the value. + /// + /// The connector. + /// The grid control. + /// The dependencies. + /// The context cache. + /// + /// The value. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static string? GetValue(this IGridCellValueConnector connector, GridValue.GridControl gridControl, ICollection dependencies, IContextCache contextCache) + => connector is IGridCellValueConnector2 connector2 + ? connector2.GetValue(gridControl, dependencies, contextCache) + : connector.GetValue(gridControl, dependencies); + + /// + /// Sets the value. + /// + /// The connector. + /// The grid control. + /// The context cache. + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static void SetValue(this IGridCellValueConnector connector, GridValue.GridControl gridControl, IContextCache contextCache) + { + if (connector is IGridCellValueConnector2 connector2) + { + connector2.SetValue(gridControl, contextCache); + } + else + { + connector.SetValue(gridControl); + } + } +} diff --git a/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs index a9ed5fd84d..4395202a56 100644 --- a/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs +++ b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs @@ -1,5 +1,4 @@ using Umbraco.Cms.Core.Models; -using static Umbraco.Cms.Core.Models.GridValue; namespace Umbraco.Cms.Core.Deploy; @@ -37,20 +36,8 @@ public interface IGridCellValueConnector /// /// Note that /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - string? GetValue(GridValue.GridControl gridControl, ICollection dependencies) - => GetValue(gridControl, dependencies, PassThroughCache.Instance); - - /// - /// Gets the value to be deployed from the control value as a string. - /// - /// The control containing the value. - /// The dependencies of the property. - /// The context cache. - /// - /// The grid cell value to be deployed. - /// - string? GetValue(GridValue.GridControl gridControl, ICollection dependencies, IContextCache contextCache); + [Obsolete($"Implement {nameof(IGridCellValueConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? GetValue(GridValue.GridControl gridControl, ICollection dependencies); /// /// Allows you to modify the value of a control being deployed. @@ -60,18 +47,6 @@ public interface IGridCellValueConnector /// Follows the pattern of the property value connectors (). /// The SetValue method is used to modify the value of the . /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - void SetValue(GridValue.GridControl gridControl) - => SetValue(gridControl, PassThroughCache.Instance); - - /// - /// Allows you to modify the value of a control being deployed. - /// - /// The control being deployed. - /// The context cache. - /// - /// Follows the pattern of the property value connectors (). - /// The SetValue method is used to modify the value of the . - /// - void SetValue(GridValue.GridControl gridControl, IContextCache contextCache); + [Obsolete($"Implement {nameof(IGridCellValueConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + void SetValue(GridValue.GridControl gridControl); } diff --git a/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector2.cs b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector2.cs new file mode 100644 index 0000000000..44a36677e9 --- /dev/null +++ b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector2.cs @@ -0,0 +1,42 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// +/// This interface will be merged back into and removed in Umbraco 13. +/// +public interface IGridCellValueConnector2 : IGridCellValueConnector +{ + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? IGridCellValueConnector.GetValue(GridValue.GridControl gridControl, ICollection dependencies) + => GetValue(gridControl, dependencies, PassThroughCache.Instance); + + /// + /// Gets the value to be deployed from the control value as a string. + /// + /// The control containing the value. + /// The dependencies of the property. + /// The context cache. + /// + /// The grid cell value to be deployed. + /// + string? GetValue(GridValue.GridControl gridControl, ICollection dependencies, IContextCache contextCache); + + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + void IGridCellValueConnector.SetValue(GridValue.GridControl gridControl) + => SetValue(gridControl, PassThroughCache.Instance); + + /// + /// Allows you to modify the value of a control being deployed. + /// + /// The control being deployed. + /// The context cache. + /// + /// Follows the pattern of the property value connectors (). + /// The SetValue method is used to modify the value of the . + /// + void SetValue(GridValue.GridControl gridControl, IContextCache contextCache); +} diff --git a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/CoreThings/UdiTests.cs b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/CoreThings/UdiTests.cs index 3cc54f4933..e18993ede1 100644 --- a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/CoreThings/UdiTests.cs +++ b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/CoreThings/UdiTests.cs @@ -305,7 +305,7 @@ public class UdiTests } [UdiDefinition("foo", UdiType.GuidUdi)] - public class FooConnector : IServiceConnector + public class FooConnector : IServiceConnector2 { public IArtifact GetArtifact(Udi udi, IContextCache contextCache) => throw new NotImplementedException();