We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c95ede commit 03febddCopy full SHA for 03febdd
src/Migrator/Framework/Extensions/LinqExtensions.cs
@@ -0,0 +1,18 @@
1
+using System;
2
+
3
+namespace DotNetProjects.Migrator.Framework.Extensions;
4
5
+public static class LinqExtensions
6
+{
7
+ /// <summary>
8
+ /// Is equal to the Contains method in .NET 9. Please remove it after .NET upgrade.
9
+ /// </summary>
10
+ /// <param name="source"></param>
11
+ /// <param name="toBeChecked"></param>
12
+ /// <param name="stringComparison"></param>
13
+ /// <returns></returns>
14
+ public static bool Contains(this string source, string toBeChecked, StringComparison stringComparison)
15
+ {
16
+ return source?.IndexOf(toBeChecked, stringComparison) >= 0;
17
+ }
18
+}
0 commit comments