Files
Umbraco-CMS/src/Umbraco.Core/Models/ContentEditing/TreeSearchResult.cs
2022-02-16 16:03:53 +01:00

35 lines
1.2 KiB
C#

using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Umbraco.Cms.Core.Models.ContentEditing
{
/// <summary>
/// Represents a search result by entity type
/// </summary>
[DataContract(Name = "searchResult", Namespace = "")]
public class TreeSearchResult
{
[DataMember(Name = "appAlias")]
public string? AppAlias { get; set; }
[DataMember(Name = "treeAlias")]
public string? TreeAlias { get; set; }
/// <summary>
/// This is optional but if specified should be the name of an angular service to format the search result.
/// </summary>
[DataMember(Name = "jsSvc")]
public string? JsFormatterService { get; set; }
/// <summary>
/// This is optional but if specified should be the name of a method on the jsSvc angular service to use, if not
/// specified than it will expect the method to be called `format(searchResult, appAlias, treeAlias)`
/// </summary>
[DataMember(Name = "jsMethod")]
public string? JsFormatterMethod { get; set; }
[DataMember(Name = "results")]
public IEnumerable<SearchResultEntity>? Results { get; set; }
}
}