From bd6ed779fb1de4f1388b40bf819907291d78d367 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 2 Jun 2024 11:10:37 -0500 Subject: fix typos --- src/slskd/Common/CommonExtensions.cs | 8 ++++---- src/slskd/Common/Configuration/CommandLineConfigurationSource.cs | 2 +- .../Configuration/EnvironmentVariableConfigurationSource.cs | 4 ++-- src/slskd/Common/Configuration/RequiresReconnectAttribute.cs | 3 +++ src/slskd/Common/Configuration/RequiresRestartAttribute.cs | 3 +++ src/slskd/Common/Exceptions/OutOfRangeException.cs | 1 - src/slskd/Common/Exceptions/RetryException.cs | 2 +- src/slskd/Common/Exceptions/SlskdException.cs | 2 +- src/slskd/Common/ManagedState.cs | 6 +++--- src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs | 2 +- src/slskd/Common/Retry.cs | 2 +- src/slskd/Common/Validation/EnumAttribute.cs | 2 +- src/slskd/Common/Validation/ValidationExtensions.cs | 2 +- src/slskd/Common/Waiter.cs | 4 ++-- 14 files changed, 24 insertions(+), 19 deletions(-) (limited to 'src/slskd/Common') diff --git a/src/slskd/Common/CommonExtensions.cs b/src/slskd/Common/CommonExtensions.cs index 6a472b9b..a68ce2f2 100644 --- a/src/slskd/Common/CommonExtensions.cs +++ b/src/slskd/Common/CommonExtensions.cs @@ -209,7 +209,7 @@ namespace slskd } /// - /// Replaces the first occurance of in the string with . + /// Replaces the first occurrence of in the string with . /// /// The string on which to perform the replacement. /// The phrase or substring to replace. @@ -307,7 +307,7 @@ namespace slskd /// /// The type to which to deserialize the string. /// The string to deserialize. - /// The new object deserialzied from the string. + /// The new object deserialized from the string. public static T FromYaml(this string str) => new DeserializerBuilder() .WithNamingConvention(UnderscoredNamingConvention.Instance) .Build() @@ -401,7 +401,7 @@ namespace slskd } /// - /// Replaces any occurance of an invalid filename character with the specified . + /// Replaces any occurrence of an invalid filename character with the specified . /// /// The path to sanitize. /// The character with which to replace invalid characters. @@ -451,7 +451,7 @@ namespace slskd /// /// The type to which to deserialize the string. /// The string to deserialize. - /// The new object deserialzied from the string. + /// The new object deserialized from the string. public static T FromJson(this string str) => JsonSerializer.Deserialize(str, GetJsonSerializerOptions()); private static JsonSerializerOptions GetJsonSerializerOptions() diff --git a/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs b/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs index 96d8d623..8aa31242 100644 --- a/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs +++ b/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs @@ -30,7 +30,7 @@ namespace slskd.Configuration public static class CommandLineConfigurationExtensions { /// - /// Adds a command line argument configuration soruce to . + /// Adds a command line argument configuration source to . /// /// The to which to add. /// The type from which to map properties. diff --git a/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs b/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs index 6d2896c2..7049050d 100644 --- a/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs +++ b/src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs @@ -55,7 +55,7 @@ namespace slskd.Configuration } /// - /// Adds an enviroment variable configuration source to . + /// Adds an environment variable configuration source to . /// /// The to which to add. /// Configures the source. @@ -65,7 +65,7 @@ namespace slskd.Configuration } /// - /// An enviroment variable . + /// An environment variable . /// public class EnvironmentVariableConfigurationProvider : ConfigurationProvider { diff --git a/src/slskd/Common/Configuration/RequiresReconnectAttribute.cs b/src/slskd/Common/Configuration/RequiresReconnectAttribute.cs index cd5edd14..216c0399 100644 --- a/src/slskd/Common/Configuration/RequiresReconnectAttribute.cs +++ b/src/slskd/Common/Configuration/RequiresReconnectAttribute.cs @@ -19,6 +19,9 @@ namespace slskd.Configuration { using System; + /// + /// Indicates that the application must disconnect and reconnect to the Soulseek server for changes to take effect. + /// [AttributeUsage(AttributeTargets.Property)] public class RequiresReconnectAttribute : Attribute { diff --git a/src/slskd/Common/Configuration/RequiresRestartAttribute.cs b/src/slskd/Common/Configuration/RequiresRestartAttribute.cs index 9b90eabe..9f94eb4f 100644 --- a/src/slskd/Common/Configuration/RequiresRestartAttribute.cs +++ b/src/slskd/Common/Configuration/RequiresRestartAttribute.cs @@ -19,6 +19,9 @@ namespace slskd.Configuration { using System; + /// + /// Indicates that the application must be restarted for any changes to take effect. + /// [AttributeUsage(AttributeTargets.Property)] public class RequiresRestartAttribute : Attribute { diff --git a/src/slskd/Common/Exceptions/OutOfRangeException.cs b/src/slskd/Common/Exceptions/OutOfRangeException.cs index 3eb3ab6d..2ee562af 100644 --- a/src/slskd/Common/Exceptions/OutOfRangeException.cs +++ b/src/slskd/Common/Exceptions/OutOfRangeException.cs @@ -19,7 +19,6 @@ namespace slskd { using System; using System.Diagnostics.CodeAnalysis; - using System.Runtime.Serialization; /// /// Represents errors that originate when a value falls out of an expected range. diff --git a/src/slskd/Common/Exceptions/RetryException.cs b/src/slskd/Common/Exceptions/RetryException.cs index 3adadd2e..582c76d2 100644 --- a/src/slskd/Common/Exceptions/RetryException.cs +++ b/src/slskd/Common/Exceptions/RetryException.cs @@ -21,7 +21,7 @@ namespace slskd using System.Diagnostics.CodeAnalysis; /// - /// Represents erorrs that originate while attempting to execute retry logic. + /// Represents errors that originate while attempting to execute retry logic. /// [ExcludeFromCodeCoverage] public class RetryException : Exception diff --git a/src/slskd/Common/Exceptions/SlskdException.cs b/src/slskd/Common/Exceptions/SlskdException.cs index 22676161..db5131c9 100644 --- a/src/slskd/Common/Exceptions/SlskdException.cs +++ b/src/slskd/Common/Exceptions/SlskdException.cs @@ -21,7 +21,7 @@ namespace slskd using System.Diagnostics.CodeAnalysis; /// - /// Represents erorrs that originate from slskd logic. + /// Represents errors that originate from slskd logic. /// [ExcludeFromCodeCoverage] public class SlskdException : Exception diff --git a/src/slskd/Common/ManagedState.cs b/src/slskd/Common/ManagedState.cs index bf6565db..3e439030 100644 --- a/src/slskd/Common/ManagedState.cs +++ b/src/slskd/Common/ManagedState.cs @@ -35,7 +35,7 @@ namespace slskd /// /// Registers a listener to be called whenever the tracked state changes. /// - /// Registers a listener to be called whenver state changes. + /// Registers a listener to be called whenever state changes. /// An which should be disposed to stop listening for changes. IDisposable OnChange(Action<(T Previous, T Current)> listener); } @@ -164,9 +164,9 @@ namespace slskd private object Lock { get; } = new object(); /// - /// Registers a listener to be called whenever the stracked state changes. + /// Registers a listener to be called whenever the tracked state changes. /// - /// Registers a listener to be called whenver state changes. + /// Registers a listener to be called whenever state changes. /// An which should be disposed to stop listening for changes. public IDisposable OnChange(Action<(T Previous, T Current)> listener) { diff --git a/src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs b/src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs index 4b90d6da..a276bdea 100644 --- a/src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs +++ b/src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs @@ -66,7 +66,7 @@ namespace slskd private RequestDelegate Next { get; } /// - /// Executes this middleware, returning the contents of the requested HTML file with the specified replacesments made. + /// Executes this middleware, returning the contents of the requested HTML file with the specified replacements made. /// /// /// diff --git a/src/slskd/Common/Retry.cs b/src/slskd/Common/Retry.cs index 2f7b24cd..300c1c51 100644 --- a/src/slskd/Common/Retry.cs +++ b/src/slskd/Common/Retry.cs @@ -53,7 +53,7 @@ namespace slskd /// A function returning a value indicating whether the last Exception is retryable. /// An action to execute on failure. /// The maximum number of retry attempts. - /// The maximum delay in miliseconds. + /// The maximum delay in milliseconds. /// The token to monitor for cancellation requests. /// The Type of the logic return value. /// The execution context. diff --git a/src/slskd/Common/Validation/EnumAttribute.cs b/src/slskd/Common/Validation/EnumAttribute.cs index ad9b393c..ab28a9f0 100644 --- a/src/slskd/Common/Validation/EnumAttribute.cs +++ b/src/slskd/Common/Validation/EnumAttribute.cs @@ -21,7 +21,7 @@ namespace slskd.Validation using System.ComponentModel.DataAnnotations; /// - /// Validates that the value is a valid nember of the specified . + /// Validates that the value is a valid member of the specified . /// public class EnumAttribute : ValidationAttribute { diff --git a/src/slskd/Common/Validation/ValidationExtensions.cs b/src/slskd/Common/Validation/ValidationExtensions.cs index fd1da598..7a85a995 100644 --- a/src/slskd/Common/Validation/ValidationExtensions.cs +++ b/src/slskd/Common/Validation/ValidationExtensions.cs @@ -22,7 +22,7 @@ namespace slskd.Validation using System.Linq; /// - /// Extension methods for types involved with validaiton. + /// Extension methods for types involved with validation. /// public static class ValidationExtensions { diff --git a/src/slskd/Common/Waiter.cs b/src/slskd/Common/Waiter.cs index 58fbcb83..f8b3d305 100644 --- a/src/slskd/Common/Waiter.cs +++ b/src/slskd/Common/Waiter.cs @@ -348,7 +348,7 @@ namespace slskd // enqueueing a new wait. if (queue.IsEmpty) { - // enter the write lock to prevent Wait() (which obtains a read lock) from enqueing any more waits + // enter the write lock to prevent Wait() (which obtains a read lock) from enqueuing any more waits // before we can delete the dictionary record. it's ok and expected that Wait() might add this record // back to the dictionary as soon as this unblocks; we're preventing new waits from being discarded if // they are added by another thread just prior to the TryRemove() operation below. @@ -357,7 +357,7 @@ namespace slskd try { // check the queue again to ensure Wait() didn't enqueue anything between the last check and when - // we entered the write lock. this is guarateed to be safe since we now have exclusive access to + // we entered the write lock. this is guaranteed to be safe since we now have exclusive access to // the record and it should be impossible to remove a record containing a non-empty queue if (queue.IsEmpty) { -- cgit v1.2.3