Class MediaValueSetBuilder
Responsible for constructing Examine.ValueSet instances representing media items for indexing by the Examine search engine in Umbraco. This builder extracts relevant properties from media entities to facilitate efficient searching and retrieval.
Namespace: Umbraco.Cms.Infrastructure.Examine
Assembly: Umbraco.Infrastructure.dll
Syntax
public class MediaValueSetBuilder : BaseValueSetBuilder<IMedia>, IValueSetBuilder<IMedia>
Constructors
View SourceMediaValueSetBuilder(PropertyEditorCollection, UrlSegmentProviderCollection, MediaUrlGeneratorCollection, IUserService, IShortStringHelper, IOptions<ContentSettings>, IContentTypeService)
Initializes a new instance of the MediaValueSetBuilder class.
Declaration
public MediaValueSetBuilder(PropertyEditorCollection propertyEditors, UrlSegmentProviderCollection urlSegmentProviders, MediaUrlGeneratorCollection mediaUrlGenerators, IUserService userService, IShortStringHelper shortStringHelper, IOptions<ContentSettings> contentSettings, IContentTypeService contentTypeService)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyEditorCollection | propertyEditors | A collection of PropertyEditorCollection used to manage property editors for media items. |
| UrlSegmentProviderCollection | urlSegmentProviders | A collection of UrlSegmentProviderCollection used to generate URL segments for media items. |
| MediaUrlGeneratorCollection | mediaUrlGenerators | A collection of MediaUrlGeneratorCollection used to generate URLs for media items. |
| IUserService | userService | An implementation of IUserService for accessing user-related operations. |
| IShortStringHelper | shortStringHelper | An implementation of IShortStringHelper for string manipulation and formatting. |
| IOptions<ContentSettings> | contentSettings | The Microsoft.Extensions.Options.IOptions<TOptions> providing configuration options for content. |
| IContentTypeService | contentTypeService | An implementation of IContentTypeService for accessing content type information. |
Methods
View SourceGetValueSets(params IMedia[])
Creates a collection of Examine.ValueSet to be indexed based on a collection of IMedia.
Declaration
public override IEnumerable<ValueSet> GetValueSets(params IMedia[] media)
Parameters
| Type | Name | Description |
|---|---|---|
| IMedia[] | media |
Returns
| Type | Description |
|---|---|
| IEnumerable<ValueSet> |