1
0

Adding Domain and IPAddress comparer

This commit is contained in:
2024-06-16 21:09:38 +02:00
parent 8e31601d75
commit 508379d704
8 changed files with 262 additions and 15 deletions

View File

@@ -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
}