use List instead of IList, remove "List" from method names. remove unnecessary using statements

This commit is contained in:
sbwalker
2024-06-11 10:38:44 -04:00
parent b27f80ef87
commit 27356ef747
11 changed files with 23 additions and 32 deletions

View File

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using Oqtane.Models;
namespace Oqtane.Services
@ -15,6 +12,6 @@ namespace Oqtane.Services
bool IsIndexEnabled(int siteId);
int IndexContent(int siteId, DateTime? startTime, Action<IList<SearchContent>> processSearchContent, Action<string> handleError);
int IndexContent(int siteId, DateTime? startTime, Action<List<SearchContent>> processSearchContent, Action<string> handleError);
}
}

View File

@ -31,9 +31,9 @@ namespace Oqtane.Models
public string AdditionalContent { get; set; }
public IList<SearchContentProperty> SearchContentProperties { get; set; }
public List<SearchContentProperty> SearchContentProperties { get; set; }
public IList<SearchContentWord> SearchContentWords { get; set; }
public List<SearchContentWord> SearchContentWords { get; set; }
public override string ToString()
{

View File

@ -14,7 +14,7 @@ namespace Oqtane.Models
public string Keywords { get; set; }
public IList<string> EntityNames { get; set; } = new List<string>();
public List<string> EntityNames { get; set; } = new List<string>();
public DateTime BeginModifiedTimeUtc { get; set; }

View File

@ -4,7 +4,7 @@ namespace Oqtane.Models
{
public class SearchResults
{
public IList<SearchResult> Results { get; set; }
public List<SearchResult> Results { get; set; }
public int TotalResults { get; set; }
}

View File

@ -4,14 +4,14 @@ namespace Oqtane.Shared
{
public sealed class SearchUtils
{
private static readonly IList<string> _systemPages;
private static readonly List<string> _systemPages;
static SearchUtils()
{
_systemPages = new List<string> { "login", "register", "profile", "404", "search" };
}
public static IList<string> GetKeywordsList(string keywords)
public static List<string> GetKeywords(string keywords)
{
var keywordsList = new List<string>();
if(!string.IsNullOrEmpty(keywords))