Adding Domain and IPAddress comparer
This commit is contained in:
@@ -15,7 +15,7 @@ namespace AMWD.Common.Comparer
|
||||
|
||||
public class VersionStringComparer : IComparer<string>
|
||||
{
|
||||
private readonly Regex _versionRegex = new("([0-9.]+)");
|
||||
private readonly Regex _versionRegex = new("([0-9.]+)", RegexOptions.Compiled);
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
@@ -32,16 +32,16 @@ namespace AMWD.Common.Comparer
|
||||
/// <description>Meaning</description>
|
||||
/// </listheader>
|
||||
/// <item>
|
||||
/// <term>-1</term>
|
||||
/// <description>x is less than y</description>
|
||||
/// <term>Less than zero</term>
|
||||
/// <description>x is less than y.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>0</term>
|
||||
/// <description>x equals y</description>
|
||||
/// <term>Zero</term>
|
||||
/// <description>x equals y.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <term>1</term>
|
||||
/// <description>x is greater than y</description>
|
||||
/// <term>Greater than zero</term>
|
||||
/// <description>x is greater than y.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// </returns>
|
||||
@@ -79,7 +79,7 @@ namespace AMWD.Common.Comparer
|
||||
}
|
||||
|
||||
#if NET8_0_OR_GREATER
|
||||
[GeneratedRegex("([0-9.]+)")]
|
||||
[GeneratedRegex("([0-9.]+)", RegexOptions.Compiled)]
|
||||
private static partial Regex VersionRegex();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user