Class MediaUrlGeneratorCollection
Represents a collection of IMediaUrlGenerator instances.
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Core.dll
Syntax
public class MediaUrlGeneratorCollection : BuilderCollectionBase<IMediaUrlGenerator>, IBuilderCollection<IMediaUrlGenerator>
Constructors
View SourceMediaUrlGeneratorCollection(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 SourceTryGetMediaPath(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 |
|