diff --git a/PowerKit/Adler32.cs b/PowerKit/Adler32.cs index 38bb3bd..c415e5f 100644 --- a/PowerKit/Adler32.cs +++ b/PowerKit/Adler32.cs @@ -44,9 +44,7 @@ public static uint Hash(byte[] data) } #if !NETFRAMEWORK || NET45_OR_GREATER - /// - /// Computes the Adler-32 checksum of the specified data. - /// + /// public static uint Hash(ReadOnlySpan data) { var a = 1u; diff --git a/PowerKit/Crc32.cs b/PowerKit/Crc32.cs index 5ef02bf..20f8431 100644 --- a/PowerKit/Crc32.cs +++ b/PowerKit/Crc32.cs @@ -61,9 +61,7 @@ public static uint Hash(byte[] data) } #if !NETFRAMEWORK || NET45_OR_GREATER - /// - /// Computes the CRC-32 checksum of the specified data. - /// + /// public static uint Hash(ReadOnlySpan data) { var crc = 0xFFFFFFFFu; diff --git a/PowerKit/Deflate.cs b/PowerKit/Deflate.cs index 3425dfb..8320734 100644 --- a/PowerKit/Deflate.cs +++ b/PowerKit/Deflate.cs @@ -37,9 +37,7 @@ public static byte[] Compress(byte[] data) } #if !NETFRAMEWORK || NET45_OR_GREATER - /// - /// Compresses the specified data using the Deflate algorithm. - /// + /// public static byte[] Compress(ReadOnlySpan data) => Compress(data.ToArray()); #endif @@ -67,9 +65,7 @@ public static byte[] Decompress(byte[] data) } #if !NETFRAMEWORK || NET45_OR_GREATER - /// - /// Decompresses the specified data using the Deflate algorithm. - /// + /// public static byte[] Decompress(ReadOnlySpan data) => Decompress(data.ToArray()); #endif } diff --git a/PowerKit/Extensions/EnumExtensions.cs b/PowerKit/Extensions/EnumExtensions.cs index 4e09136..be0bc1a 100644 --- a/PowerKit/Extensions/EnumExtensions.cs +++ b/PowerKit/Extensions/EnumExtensions.cs @@ -17,10 +17,7 @@ public static class EnumExtensions where TEnum : struct, Enum => Enum.TryParse(str, ignoreCase, out var result) ? result : null; - /// - /// Parses the string as an enum value of type , - /// returning if parsing fails. - /// + /// public static TEnum? ParseOrNull(string? str) where TEnum : struct, Enum => Enum.ParseOrNull(str, false); @@ -35,10 +32,7 @@ public static TEnum ParseOrDefault( ) where TEnum : struct, Enum => Enum.ParseOrNull(str, ignoreCase) ?? defaultValue; - /// - /// Parses the string as an enum value of type , - /// returning if parsing fails. - /// + /// public static TEnum ParseOrDefault(string? str, TEnum defaultValue = default) where TEnum : struct, Enum => Enum.ParseOrDefault(str, false, defaultValue); } diff --git a/PowerKit/Extensions/FileExtensions.cs b/PowerKit/Extensions/FileExtensions.cs index 4476502..2823b4c 100644 --- a/PowerKit/Extensions/FileExtensions.cs +++ b/PowerKit/Extensions/FileExtensions.cs @@ -97,10 +97,7 @@ public static bool Contains(string path, ReadOnlySpan bytes) return false; } - /// - /// Checks whether the file at the specified path contains the given byte sequence. - /// Returns if is empty. - /// + /// public static bool Contains(string path, byte[] bytes) => File.Contains(path, new ReadOnlySpan(bytes)); #endif diff --git a/PowerKit/Extensions/HttpClientExtensions.cs b/PowerKit/Extensions/HttpClientExtensions.cs index 96a628e..16e8158 100644 --- a/PowerKit/Extensions/HttpClientExtensions.cs +++ b/PowerKit/Extensions/HttpClientExtensions.cs @@ -40,9 +40,7 @@ await response .ConfigureAwait(false); } - /// - /// Downloads the content at the specified URI to a local file. - /// + /// public async Task DownloadAsync( string requestUri, string filePath, @@ -74,9 +72,7 @@ public async Task HeadAsync( .ConfigureAwait(false); } - /// - /// Sends a HEAD request to the specified URI and returns the response. - /// + /// public async Task HeadAsync( string requestUri, CancellationToken cancellationToken = default