Setting Find Changes

- added a find window to find setting in the settings control.
This commit is contained in:
Brett Hewitson 2022-06-18 15:29:22 +10:00
parent 174b5f14c9
commit 46997c6e71
18 changed files with 774 additions and 263 deletions

View 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;
}
}
}