From 2c202f10032c83134decbc18d1847091f51f0e08 Mon Sep 17 00:00:00 2001 From: MichalPetryka <35800402+MichalPetryka@users.noreply.github.com> Date: Wed, 5 Aug 2020 19:43:56 +0200 Subject: [PATCH] Change version and fix XML comments (#20) * Change version to 1.1.0 * Fix XML comments * Update IPool.cs * Include Nuget references in builds * Update packages --- NorthwoodLib.Tests/NorthwoodLib.Tests.csproj | 2 +- NorthwoodLib/Logging/LogType.cs | 12 ++++++++++++ NorthwoodLib/NativeMemory.cs | 3 +++ NorthwoodLib/NorthwoodLib.csproj | 20 ++++++++++++++++++++ NorthwoodLib/PlatformSettings.cs | 2 +- NorthwoodLib/Pools/IPool.cs | 6 +++--- NorthwoodLib/StringUtils.cs | 12 ++++++------ 7 files changed, 46 insertions(+), 11 deletions(-) diff --git a/NorthwoodLib.Tests/NorthwoodLib.Tests.csproj b/NorthwoodLib.Tests/NorthwoodLib.Tests.csproj index 69acf4e..3981404 100644 --- a/NorthwoodLib.Tests/NorthwoodLib.Tests.csproj +++ b/NorthwoodLib.Tests/NorthwoodLib.Tests.csproj @@ -12,7 +12,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/NorthwoodLib/Logging/LogType.cs b/NorthwoodLib/Logging/LogType.cs index 3ebfea0..55ad937 100644 --- a/NorthwoodLib/Logging/LogType.cs +++ b/NorthwoodLib/Logging/LogType.cs @@ -5,9 +5,21 @@ namespace NorthwoodLib.Logging /// public enum LogType { + /// + /// Debugging logs + /// Debug, + /// + /// Informational logs + /// Info, + /// + /// Warning logs + /// Warning, + /// + /// Error logs + /// Error } } diff --git a/NorthwoodLib/NativeMemory.cs b/NorthwoodLib/NativeMemory.cs index a35e228..fd16557 100644 --- a/NorthwoodLib/NativeMemory.cs +++ b/NorthwoodLib/NativeMemory.cs @@ -55,6 +55,9 @@ public void Dispose() GC.SuppressFinalize(this); } + /// + /// Frees allocated memory + /// ~NativeMemory() { Free(); diff --git a/NorthwoodLib/NorthwoodLib.csproj b/NorthwoodLib/NorthwoodLib.csproj index 69e78d8..47d5afb 100644 --- a/NorthwoodLib/NorthwoodLib.csproj +++ b/NorthwoodLib/NorthwoodLib.csproj @@ -4,6 +4,7 @@ 7.3 true NorthwoodLib + true NorthwoodLib NorthwoodLib @@ -28,6 +29,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/NorthwoodLib/PlatformSettings.cs b/NorthwoodLib/PlatformSettings.cs index 1e4b3cd..bc4d8d8 100644 --- a/NorthwoodLib/PlatformSettings.cs +++ b/NorthwoodLib/PlatformSettings.cs @@ -11,7 +11,7 @@ public static class PlatformSettings /// /// Current library version /// - internal const string VersionConst = "1.0.0"; + internal const string VersionConst = "1.1.0"; /// /// Returns the library version diff --git a/NorthwoodLib/Pools/IPool.cs b/NorthwoodLib/Pools/IPool.cs index 4875fc2..d9cceae 100644 --- a/NorthwoodLib/Pools/IPool.cs +++ b/NorthwoodLib/Pools/IPool.cs @@ -7,12 +7,12 @@ namespace NorthwoodLib.Pools public interface IPool where T : class { /// - /// Returns a pooled instance of + /// Returns a pooled instance of /// - /// from the pool + /// from the pool T Rent(); /// - /// Returns a to the pool + /// Returns a to the pool /// /// Pooled object void Return(T obj); diff --git a/NorthwoodLib/StringUtils.cs b/NorthwoodLib/StringUtils.cs index 8b6b62e..84cca4b 100644 --- a/NorthwoodLib/StringUtils.cs +++ b/NorthwoodLib/StringUtils.cs @@ -15,12 +15,12 @@ public static class StringUtils private static readonly Regex TagRegex = new Regex("<.*?>", RegexOptions.Compiled); /// - /// Truncates a string to the last occurance of within characters if it's longer than it + /// Truncates a string to the last occurance of within characters if it's longer than it /// /// Processed text /// Maximum size /// Checked character - /// Truncated + /// Truncated public static string TruncateToLast(this string text, int maxSize, char character) { int index = text.LastIndexOf(character, maxSize - 1, maxSize); @@ -28,13 +28,13 @@ public static string TruncateToLast(this string text, int maxSize, char characte } /// - /// Truncates a string to the last occurance of within characters if it's longer than it + /// Truncates a string to the last occurance of within characters if it's longer than it /// /// Processed text /// Maximum size /// Checked string /// String comparison - /// Truncated + /// Truncated public static string TruncateToLast(this string text, int maxSize, string str, StringComparison comparison = StringComparison.Ordinal) { int index = text.LastIndexOf(str, maxSize - 1, maxSize, comparison); @@ -45,7 +45,7 @@ public static string TruncateToLast(this string text, int maxSize, string str, S /// Converts a text to Base64 encoded UTF8 /// /// Processed text - /// Base64 encoded UTF8 of + /// Base64 encoded UTF8 of public static string Base64Encode(string plainText) { byte[] buffer = ArrayPool.Shared.Rent(Encoding.UTF8.GetMaxByteCount(plainText.Length)); @@ -83,7 +83,7 @@ public static bool Contains(this string s, char value) /// Checked string /// The string to seek. /// One of the enumeration values that specifies the rules to use in the comparison. - /// if the occurs within this string, or if is the empty string (""); otherwise, . + /// if the occurs within this string, or if is the empty string (""); otherwise, . public static bool Contains(this string s, string value, StringComparison comparison) { return s.IndexOf(value, comparison) >= 0;