Use immutable types
This commit is contained in:
@@ -4,10 +4,10 @@ namespace Umbraco.Web.Search
|
||||
{
|
||||
public interface IInternalSearchConstants
|
||||
{
|
||||
List<string> GetBackOfficeFields();
|
||||
List<string> GetBackOfficeMembersFields();
|
||||
|
||||
List<string> GetBackOfficeMediaFields();
|
||||
List<string> GetBackOfficeDocumentFields();
|
||||
IEnumerable<string> GetBackOfficeFields();
|
||||
IEnumerable<string> GetBackOfficeMembersFields();
|
||||
|
||||
IEnumerable<string> GetBackOfficeMediaFields();
|
||||
IEnumerable<string> GetBackOfficeDocumentFields();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,25 +6,25 @@ namespace Umbraco.Web
|
||||
{
|
||||
public class InternalSearchConstants : IInternalSearchConstants
|
||||
{
|
||||
private List<string> _backOfficeFields = new List<string> {"id", "__NodeId", "__Key"};
|
||||
public List<string> GetBackOfficeFields()
|
||||
private IReadOnlyList<string> _backOfficeFields = new List<string> {"id", "__NodeId", "__Key"};
|
||||
public IEnumerable<string> GetBackOfficeFields()
|
||||
{
|
||||
return _backOfficeFields;
|
||||
}
|
||||
|
||||
|
||||
private List<string> _backOfficeMembersFields = new List<string> {"email", "loginName"};
|
||||
public List<string> GetBackOfficeMembersFields()
|
||||
private IReadOnlyList<string> _backOfficeMembersFields = new List<string> {"email", "loginName"};
|
||||
public IEnumerable<string> GetBackOfficeMembersFields()
|
||||
{
|
||||
return _backOfficeMembersFields;
|
||||
}
|
||||
private List<string> _backOfficeMediaFields = new List<string> {UmbracoExamineIndex.UmbracoFileFieldName };
|
||||
public List<string> GetBackOfficeMediaFields()
|
||||
private IReadOnlyList<string> _backOfficeMediaFields = new List<string> {UmbracoExamineIndex.UmbracoFileFieldName };
|
||||
public IEnumerable<string> GetBackOfficeMediaFields()
|
||||
{
|
||||
return _backOfficeMediaFields;
|
||||
}
|
||||
private List<string> _backOfficeDocumentFields = new List<string> ();
|
||||
public List<string> GetBackOfficeDocumentFields()
|
||||
private IReadOnlyList<string> _backOfficeDocumentFields = new List<string> ();
|
||||
public IEnumerable<string> GetBackOfficeDocumentFields()
|
||||
{
|
||||
return _backOfficeDocumentFields;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user