diff --git a/src/Atc.Kusto/Extensions/Internal/StringExtensions.cs b/src/Atc.Kusto/Extensions/Internal/StringExtensions.cs index b737fa5..63adfa9 100644 --- a/src/Atc.Kusto/Extensions/Internal/StringExtensions.cs +++ b/src/Atc.Kusto/Extensions/Internal/StringExtensions.cs @@ -13,7 +13,7 @@ internal static partial class StringExtensions /// A instance that can be used to replace non-alphanumeric characters. [GeneratedRegex("[^a-zA-Z0-9]", RegexOptions.Singleline, 1000)] - private static partial Regex AlphaNumericRegex(); + private static partial Regex AlphanumericRegex(); /// /// Removes all non-alphanumeric characters from the input string, leaving only letters and digits. @@ -21,7 +21,7 @@ internal static partial class StringExtensions /// /// The input string to be filtered. /// A new string containing only alphanumeric characters from the input string. - public static string ToAlphaNumeric( + public static string ToAlphanumeric( this string str) - => AlphaNumericRegex().Replace(str, string.Empty); + => AlphanumericRegex().Replace(str, string.Empty); } \ No newline at end of file diff --git a/src/Atc.Kusto/Handlers/Internal/ExistingPagedStoredQueryHandler.cs b/src/Atc.Kusto/Handlers/Internal/ExistingPagedStoredQueryHandler.cs index 8cabe7e..a082ba3 100644 --- a/src/Atc.Kusto/Handlers/Internal/ExistingPagedStoredQueryHandler.cs +++ b/src/Atc.Kusto/Handlers/Internal/ExistingPagedStoredQueryHandler.cs @@ -44,7 +44,7 @@ public ExistingPagedStoredQueryHandler( return null; } - var queryId = split[0].ToAlphaNumeric(); + var queryId = split[0].ToAlphanumeric(); if (!long.TryParse(split[1], GlobalizationConstants.EnglishCultureInfo, out var itemsReturned)) { diff --git a/src/Atc.Kusto/Providers/Internal/QueryIdProvider.cs b/src/Atc.Kusto/Providers/Internal/QueryIdProvider.cs index 3ba4f1a..3d1eb90 100644 --- a/src/Atc.Kusto/Providers/Internal/QueryIdProvider.cs +++ b/src/Atc.Kusto/Providers/Internal/QueryIdProvider.cs @@ -18,6 +18,6 @@ public string Create( return string .Concat(queryType.Name, finalSessionId) - .ToAlphaNumeric(); + .ToAlphanumeric(); } } \ No newline at end of file diff --git a/test/Atc.Kusto.Tests/Extensions/Internal/StringExtensionsTests.cs b/test/Atc.Kusto.Tests/Extensions/Internal/StringExtensionsTests.cs index 1a97c06..9b7b1be 100644 --- a/test/Atc.Kusto.Tests/Extensions/Internal/StringExtensionsTests.cs +++ b/test/Atc.Kusto.Tests/Extensions/Internal/StringExtensionsTests.cs @@ -21,7 +21,7 @@ public void ToAlphaNumeric_ShouldRemoveNonAlphanumericCharacters( string expected) { // Arrange & Act - var actual = input.ToAlphaNumeric(); + var actual = input.ToAlphanumeric(); // Assert Assert.Equal(expected, actual); @@ -34,7 +34,7 @@ public void ToAlphaNumeric_ShouldReturnEmptyString_WhenInputIsEmpty() var input = string.Empty; // Act - var actual = input.ToAlphaNumeric(); + var actual = input.ToAlphanumeric(); // Assert Assert.Equal(string.Empty, actual);