Address Shannon comments

Add code documentation, return empty enumerable instead of allocate empty list
This commit is contained in:
abi
2020-01-21 09:07:10 +00:00
parent d33928f425
commit 0d12852cd8
2 changed files with 18 additions and 5 deletions

View File

@@ -2,12 +2,26 @@ using System.Collections.Generic;
namespace Umbraco.Web.Search
{
/// <summary>
/// Used to propagate hardcoded internal Field lists
/// </summary>
public interface IUmbracoTreeSearcherFields
{
/// <summary>
/// Propagate list of searchable fields for all node types
/// </summary>
IEnumerable<string> GetBackOfficeFields();
/// <summary>
/// Propagate list of searchable fields for Members
/// </summary>
IEnumerable<string> GetBackOfficeMembersFields();
/// <summary>
/// Propagate list of searchable fields for Media
/// </summary>
IEnumerable<string> GetBackOfficeMediaFields();
/// <summary>
/// Propagate list of searchable fields for Documents
/// </summary>
IEnumerable<string> GetBackOfficeDocumentFields();
}
}

View File

@@ -1,8 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using Umbraco.Examine;
using Umbraco.Web.Search;
namespace Umbraco.Web
namespace Umbraco.Web.Search
{
public class UmbracoTreeSearcherFields : IUmbracoTreeSearcherFields
{
@@ -23,10 +23,9 @@ namespace Umbraco.Web
{
return _backOfficeMediaFields;
}
private IReadOnlyList<string> _backOfficeDocumentFields = new List<string> ();
public IEnumerable<string> GetBackOfficeDocumentFields()
{
return _backOfficeDocumentFields;
return Enumerable.Empty<string>();
}
}
}