懒得勤快 2 gadi atpakaļ
vecāks
revīzija
0bce91583b

+ 51 - 52
Masuit.LuceneEFCore.SearchEngine/Extensions/StringHelpers.cs

@@ -5,58 +5,57 @@ using System.Text.RegularExpressions;
 
 namespace Masuit.LuceneEFCore.SearchEngine.Extensions
 {
-    public static class StringHelpers
-    {
-        /// <summary>
-        /// 移除字符串的指定字符
-        /// </summary>
-        /// <param name="s"></param>
-        /// <param name="chars"></param>
-        /// <returns></returns>
-        internal static string RemoveCharacters(this string s, IEnumerable<char> chars)
-        {
-            return string.IsNullOrEmpty(s) ? string.Empty : new string(s.Where(c => !chars.Contains(c)).ToArray());
-        }
+	public static class StringHelpers
+	{
+		/// <summary>
+		/// 移除字符串的指定字符
+		/// </summary>
+		/// <param name="s"></param>
+		/// <param name="chars"></param>
+		/// <returns></returns>
+		internal static string RemoveCharacters(this string s, IEnumerable<char> chars)
+		{
+			return string.IsNullOrEmpty(s) ? string.Empty : new string(s.Where(c => !chars.Contains(c)).ToArray());
+		}
 
-        /// <summary>
-        /// 去除html标签后并截取字符串
-        /// </summary>
-        /// <param name="html">源html</param>
-        /// <returns></returns>
-        internal static string RemoveHtmlTag(this string html)
-        {
-            var strText = Regex.Replace(html, "<[^>]+>", "");
-            strText = Regex.Replace(strText, "&[^;]+;", "");
-            return strText;
-        }
+		/// <summary>
+		/// 去除html标签后并截取字符串
+		/// </summary>
+		/// <param name="html">源html</param>
+		/// <returns></returns>
+		internal static string RemoveHtmlTag(this string html)
+		{
+			var strText = Regex.Replace(html, "<[^>]+>", "");
+			strText = Regex.Replace(strText, "&[^;]+;", "");
+			return strText;
+		}
 
-        /// <summary>
-        /// 添加多个元素
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="this"></param>
-        /// <param name="values"></param>
-        public static void AddRange<T>(this ICollection<T> @this, IEnumerable<T> values)
-        {
-            foreach (var obj in values)
-            {
-                @this.Add(obj);
-            }
-        }
+		/// <summary>
+		/// 添加多个元素
+		/// </summary>
+		/// <typeparam name="T"></typeparam>
+		/// <param name="this"></param>
+		/// <param name="values"></param>
+		public static void AddRange<T>(this ICollection<T> @this, IEnumerable<T> values)
+		{
+			foreach (var obj in values)
+			{
+				@this.Add(obj);
+			}
+		}
 
-        /// <summary>
-        /// 移除符合条件的元素
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="this"></param>
-        /// <param name="where"></param>
-        public static void RemoveWhere<T>(this ICollection<T> @this, Func<T, bool> @where)
-        {
-            foreach (var obj in @this.Where(where).ToList())
-            {
-                @this.Remove(obj);
-            }
-        }
-
-    }
-}
+		/// <summary>
+		/// 移除符合条件的元素
+		/// </summary>
+		/// <typeparam name="T"></typeparam>
+		/// <param name="this"></param>
+		/// <param name="where"></param>
+		public static void RemoveWhere<T>(this ICollection<T> @this, Func<T, bool> @where)
+		{
+			foreach (var obj in @this.Where(where).ToList())
+			{
+				@this.Remove(obj);
+			}
+		}
+	}
+}

+ 2 - 2
Masuit.LuceneEFCore.SearchEngine/Masuit.LuceneEFCore.SearchEngine.csproj

@@ -47,10 +47,10 @@
         <PackageReference Include="TinyPinyin.Net" Version="1.0.2" />
     </ItemGroup>
     <ItemGroup Condition=" '$(TargetFramework)' == 'net7'">
-        <PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.11" />
+        <PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" />
     </ItemGroup>
     <ItemGroup Condition=" '$(TargetFramework)' == 'net6'">
-        <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.22" />
+        <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.23" />
     </ItemGroup>
     <ItemGroup Condition=" '$(TargetFramework)' == 'net5'">
         <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.17" />