Search Results for

    Show / Hide Table of Contents
    View Source

    Class MediaUrlGeneratorCollection

    Represents a collection of IMediaUrlGenerator instances.

    Inheritance
    object
    BuilderCollectionBase<IMediaUrlGenerator>
    Namespace: Umbraco.Cms.Core.PropertyEditors
    Assembly: Umbraco.Core.dll
    Syntax
    public class MediaUrlGeneratorCollection : BuilderCollectionBase<IMediaUrlGenerator>, IBuilderCollection<IMediaUrlGenerator>

    Constructors

    View Source

    MediaUrlGeneratorCollection(Func<IEnumerable<IMediaUrlGenerator>>)

    Initializes a new instance of the MediaUrlGeneratorCollection class.

    Declaration
    public MediaUrlGeneratorCollection(Func<IEnumerable<IMediaUrlGenerator>> items)
    Parameters
    Type Name Description
    Func<IEnumerable<IMediaUrlGenerator>> items

    A factory function that returns the collection items.

    Methods

    View Source

    TryGetMediaPath(string?, object?, out string?)

    Tries to get the media path from the specified value using the registered generators.

    Declaration
    public bool TryGetMediaPath(string? propertyEditorAlias, object? value, out string? mediaPath)
    Parameters
    Type Name Description
    string propertyEditorAlias

    The property editor alias.

    object value

    The property value.

    string mediaPath

    When this method returns, contains the media path if found; otherwise, null.

    Returns
    Type Description
    bool

    true if a media path was found; otherwise, false.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX