Class JsonPropertyIndexValueFactoryBase<TSerialized>
Abstract base for property index value factories where the value is json.
Inheritance
Namespace: Umbraco.Cms.Core.PropertyEditors
Assembly: Umbraco.Core.dll
Syntax
public abstract class JsonPropertyIndexValueFactoryBase<TSerialized> : IPropertyIndexValueFactory
Type Parameters
| Name | Description |
|---|---|
| TSerialized | The type to deserialize the json to. |
Constructors
View SourceJsonPropertyIndexValueFactoryBase(IJsonSerializer, IOptionsMonitor<IndexingSettings>)
Constructor for the JsonPropertyIndexValueFactoryBase.
Declaration
protected JsonPropertyIndexValueFactoryBase(IJsonSerializer jsonSerializer, IOptionsMonitor<IndexingSettings> indexingSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| IJsonSerializer | jsonSerializer | |
| IOptionsMonitor<IndexingSettings> | indexingSettings |
Properties
View SourceForceExplicitlyIndexEachNestedProperty
Gets or sets a value indicating whether to force explicit indexing of each nested property.
Declaration
protected bool ForceExplicitlyIndexEachNestedProperty { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceGetIndexValues(IProperty, string?, string?, bool, IEnumerable<string>, IDictionary<Guid, IContentType>)
Gets the index values for a property.
Declaration
public virtual IEnumerable<IndexValue> GetIndexValues(IProperty property, string? culture, string? segment, bool published, IEnumerable<string> availableCultures, IDictionary<Guid, IContentType> contentTypeDictionary)
Parameters
| Type | Name | Description |
|---|---|---|
| IProperty | property | |
| string | culture | |
| string | segment | |
| bool | published | |
| IEnumerable<string> | availableCultures | |
| IDictionary<Guid, IContentType> | contentTypeDictionary |
Returns
| Type | Description |
|---|---|
| IEnumerable<IndexValue> |
Remarks
Returns index values for a given property. By default, a property uses its alias as index field name, and there would be only one index value, but some implementations (see for instance the grid one) may return more than one value, with different indexed field names.
And then, values are an enumerable of objects, because each indexed field can in turn have multiple values. By default, there would be only one object: the property value. But some implementations may return more than one value for a given field.
Handle(TSerialized, IProperty, string?, string?, bool, IEnumerable<string>, IDictionary<Guid, IContentType>)
Method that handle the deserialized object.
Declaration
protected abstract IEnumerable<IndexValue> Handle(TSerialized deserializedPropertyValue, IProperty property, string? culture, string? segment, bool published, IEnumerable<string> availableCultures, IDictionary<Guid, IContentType> contentTypeDictionary)
Parameters
| Type | Name | Description |
|---|---|---|
| TSerialized | deserializedPropertyValue | |
| IProperty | property | |
| string | culture | |
| string | segment | |
| bool | published | |
| IEnumerable<string> | availableCultures | |
| IDictionary<Guid, IContentType> | contentTypeDictionary |
Returns
| Type | Description |
|---|---|
| IEnumerable<IndexValue> |
HandleResume(List<IndexValue>, IProperty, string?, string?, bool)
Method to return a list of summary of the content. By default this returns an empty list
Declaration
protected virtual IEnumerable<IndexValue> HandleResume(List<IndexValue> result, IProperty property, string? culture, string? segment, bool published)
Parameters
| Type | Name | Description |
|---|---|---|
| List<IndexValue> | result | |
| IProperty | property | |
| string | culture | |
| string | segment | |
| bool | published |
Returns
| Type | Description |
|---|---|
| IEnumerable<IndexValue> |