Files
Umbraco-CMS/src/Umbraco.Core/Deploy/IImageSourceParser.cs
Andy Butland a42ff2c267 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.
2022-05-04 19:01:54 +02:00

26 lines
1.1 KiB
C#

namespace Umbraco.Cms.Core.Deploy
{
/// <summary>
/// Provides methods to parse image tag sources in property values.
/// </summary>
public interface IImageSourceParser
{
/// <summary>
/// Parses an Umbraco property value and produces an artifact property value.
/// </summary>
/// <param name="value">The property value.</param>
/// <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);
/// <summary>
/// Parses an artifact property value and produces an Umbraco property value.
/// </summary>
/// <param name="value">The artifact property value.</param>
/// <returns>The parsed value.</returns>
/// <remarks>Turns umb://media/... into /media/....</remarks>
string? FromArtifact(string? value);
}
}