Address Shannon comments
Add code documentation, return empty enumerable instead of allocate empty list
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user