2018-11-26 13:33:15 +11:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Umbraco.Core.Models;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.PropertyEditors
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Returns a single field to index containing the property value
|
|
|
|
|
|
/// </summary>
|
2018-12-03 22:19:35 +11:00
|
|
|
|
public class DefaultPropertyIndexValues : IPropertyIndexValues
|
2018-11-26 13:33:15 +11:00
|
|
|
|
{
|
2018-12-05 16:53:25 +11:00
|
|
|
|
public IEnumerable<KeyValuePair<string, IEnumerable<object>>> GetIndexValues(Property property, string culture, string segment, bool published)
|
2018-11-26 13:33:15 +11:00
|
|
|
|
{
|
2018-12-05 16:53:25 +11:00
|
|
|
|
yield return new KeyValuePair<string, IEnumerable<object>>(
|
|
|
|
|
|
property.Alias,
|
|
|
|
|
|
property.GetValue(culture, segment, published).Yield());
|
2018-11-26 13:33:15 +11:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|