mirror of
https://github.com/Tribufu/ServerManagers
synced 2026-08-09 12:41:06 +00:00
Setting Find Changes
- added a find window to find setting in the settings control.
This commit is contained in:
parent
174b5f14c9
commit
46997c6e71
18 changed files with 774 additions and 263 deletions
17
src/ServerManager.Common/Extensions/StringExtensions.cs
Normal file
17
src/ServerManager.Common/Extensions/StringExtensions.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
|
||||
namespace ServerManagerTool.Common.Extensions
|
||||
{
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static bool Contains(this string value, string substring, StringComparison comparisonType)
|
||||
{
|
||||
if (substring == null)
|
||||
throw new ArgumentNullException(nameof(substring), $"{nameof(substring)} cannot be null.");
|
||||
if (!Enum.IsDefined(typeof(StringComparison), comparisonType))
|
||||
throw new ArgumentException($"{nameof(comparisonType)} is not a member of StringComparison", nameof(comparisonType));
|
||||
|
||||
return value.IndexOf(substring, comparisonType) >= 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue