NRT amends necessary for Deploy (#12357)
* Allowed null item retrievel in IDeployContext.
* Allowed null item retrievel in IImageSourceParser.
* Allowed null item retrievel in IMacroParser.
* Set null syntax for other Deploy interfaces.
(cherry picked from commit a42ff2c267)
This commit is contained in:
committed by
Bjarke Berg
parent
4ab7f40ce5
commit
b1ece9b202
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Cms.Core.Deploy
|
||||
@@ -37,7 +37,7 @@ namespace Umbraco.Cms.Core.Deploy
|
||||
/// <typeparam name="T">The type of the item.</typeparam>
|
||||
/// <param name="key">The key of the item.</param>
|
||||
/// <returns>The item with the specified key and type, if any, else null.</returns>
|
||||
T Item<T>(string key) where T : class;
|
||||
T? Item<T>(string key) where T : class;
|
||||
|
||||
///// <summary>
|
||||
///// Gets the global deployment cancellation token.
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Cms.Core.Deploy
|
||||
{
|
||||
/// <summary>
|
||||
@@ -14,7 +12,7 @@ namespace Umbraco.Cms.Core.Deploy
|
||||
/// <param name="dependencies">A list of dependencies.</param>
|
||||
/// <returns>The parsed value.</returns>
|
||||
/// <remarks>Turns src="/media/..." into src="umb://media/..." and adds the corresponding udi to the dependencies.</remarks>
|
||||
string ToArtifact(string value, ICollection<Udi> dependencies);
|
||||
string? ToArtifact(string? value, ICollection<Udi> dependencies);
|
||||
|
||||
/// <summary>
|
||||
/// Parses an artifact property value and produces an Umbraco property value.
|
||||
@@ -22,6 +20,6 @@ namespace Umbraco.Cms.Core.Deploy
|
||||
/// <param name="value">The artifact property value.</param>
|
||||
/// <returns>The parsed value.</returns>
|
||||
/// <remarks>Turns umb://media/... into /media/....</remarks>
|
||||
string FromArtifact(string value);
|
||||
string? FromArtifact(string? value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Cms.Core.Deploy
|
||||
{
|
||||
@@ -10,14 +10,14 @@ namespace Umbraco.Cms.Core.Deploy
|
||||
/// <param name="value">Property value.</param>
|
||||
/// <param name="dependencies">A list of dependencies.</param>
|
||||
/// <returns>Parsed value.</returns>
|
||||
string ToArtifact(string value, ICollection<Udi> dependencies);
|
||||
string? ToArtifact(string? value, ICollection<Udi> dependencies);
|
||||
|
||||
/// <summary>
|
||||
/// Parses an artifact property value and produces an Umbraco property value.
|
||||
/// </summary>
|
||||
/// <param name="value">Artifact property value.</param>
|
||||
/// <returns>Parsed value.</returns>
|
||||
string FromArtifact(string value);
|
||||
string? FromArtifact(string? value);
|
||||
|
||||
/// <summary>
|
||||
/// Tries to replace the value of the attribute/parameter with a value containing a converted identifier.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
|
||||
namespace Umbraco.Cms.Core.Deploy
|
||||
@@ -13,7 +13,7 @@ namespace Umbraco.Cms.Core.Deploy
|
||||
/// </summary>
|
||||
/// <param name="udi">The entity identifier of the artifact.</param>
|
||||
/// <returns>The corresponding artifact, or null.</returns>
|
||||
IArtifact GetArtifact(Udi udi);
|
||||
IArtifact? GetArtifact(Udi udi);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an artifact.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Deploy
|
||||
@@ -23,7 +23,7 @@ namespace Umbraco.Cms.Core.Deploy
|
||||
/// <param name="propertyType">The value property type</param>
|
||||
/// <param name="dependencies">The content dependencies.</param>
|
||||
/// <returns>The deploy property value.</returns>
|
||||
string ToArtifact(object value, IPropertyType propertyType, ICollection<ArtifactDependency> dependencies);
|
||||
string? ToArtifact(object? value, IPropertyType propertyType, ICollection<ArtifactDependency> dependencies);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the content property value corresponding to a deploy property value.
|
||||
@@ -32,6 +32,6 @@ namespace Umbraco.Cms.Core.Deploy
|
||||
/// <param name="propertyType">The value property type<</param>
|
||||
/// <param name="currentValue">The current content property value.</param>
|
||||
/// <returns>The content property value.</returns>
|
||||
object FromArtifact(string value, IPropertyType propertyType, object currentValue);
|
||||
object? FromArtifact(string? value, IPropertyType propertyType, object currentValue);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user