Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IImageSourceParser

    Provides methods to parse image tag sources in property values.

    Namespace: Umbraco.Cms.Core.Deploy
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IImageSourceParser

    Methods

    View Source

    FromArtifactAsync(String, IContextCache, CancellationToken)

    Parses an artifact property value and produces an Umbraco property value.

    Declaration
    Task<string> FromArtifactAsync(string value, IContextCache contextCache, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String value

    The artifact property value.

    IContextCache contextCache

    The context cache.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<System.String>

    A task that represents the asynchronous operation. The task result contains the parsed value.

    Remarks

    Turns umb://media/... into /media/....

    View Source

    ToArtifactAsync(String, ICollection<Udi>, IContextCache, CancellationToken)

    Parses an Umbraco property value and produces an artifact property value.

    Declaration
    Task<string> ToArtifactAsync(string value, ICollection<Udi> dependencies, IContextCache contextCache, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.String value

    The property value.

    ICollection<Udi> dependencies

    A list of dependencies.

    IContextCache contextCache

    The context cache.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<System.String>

    A task that represents the asynchronous operation. The task result contains the parsed value.

    Remarks

    Turns src="/media/..." into src="umb://media/..." and adds the corresponding udi to the dependencies.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • FromArtifactAsync(String, IContextCache, CancellationToken)
      • ToArtifactAsync(String, ICollection<Udi>, IContextCache, CancellationToken)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX