aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Common
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2024-06-02 11:15:57 -0500
committerGitHub <noreply@github.com>2024-06-02 11:15:57 -0500
commitec31fd53e8cf91adbeae6bb20958e9c8ef85e56c (patch)
tree654d643a003a13107f1e72da121f9273726f2bdb /src/slskd/Common
parent960f03d59523c84a7f1fc256cbfacf541513d18a (diff)
parentbd6ed779fb1de4f1388b40bf819907291d78d367 (diff)
downloadslskd-ec31fd53e8cf91adbeae6bb20958e9c8ef85e56c.tar.gz
Merge pull request #1142 from slskd/typos
Fix a bunch of typos throughout
Diffstat (limited to 'src/slskd/Common')
-rw-r--r--src/slskd/Common/CommonExtensions.cs8
-rw-r--r--src/slskd/Common/Configuration/CommandLineConfigurationSource.cs2
-rw-r--r--src/slskd/Common/Configuration/EnvironmentVariableConfigurationSource.cs4
-rw-r--r--src/slskd/Common/Configuration/RequiresReconnectAttribute.cs3
-rw-r--r--src/slskd/Common/Configuration/RequiresRestartAttribute.cs3
-rw-r--r--src/slskd/Common/Exceptions/OutOfRangeException.cs1
-rw-r--r--src/slskd/Common/Exceptions/RetryException.cs2
-rw-r--r--src/slskd/Common/Exceptions/SlskdException.cs2
-rw-r--r--src/slskd/Common/ManagedState.cs6
-rw-r--r--src/slskd/Common/Middleware/HTMLRewriteMiddleware.cs2
-rw-r--r--src/slskd/Common/Retry.cs2
-rw-r--r--src/slskd/Common/Validation/EnumAttribute.cs2
-rw-r--r--src/slskd/Common/Validation/ValidationExtensions.cs2
-rw-r--r--src/slskd/Common/Waiter.cs4
14 files changed, 24 insertions, 19 deletions
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
}
/// <summary>
- /// Replaces the first occurance of <paramref name="phrase"/> in the string with <paramref name="replacement"/>.
+ /// Replaces the first occurrence of <paramref name="phrase"/> in the string with <paramref name="replacement"/>.
/// </summary>
/// <param name="str">The string on which to perform the replacement.</param>
/// <param name="phrase">The phrase or substring to replace.</param>
@@ -307,7 +307,7 @@ namespace slskd
/// </summary>
/// <typeparam name="T">The type to which to deserialize the string.</typeparam>
/// <param name="str">The string to deserialize.</param>
- /// <returns>The new object deserialzied from the string.</returns>
+ /// <returns>The new object deserialized from the string.</returns>
public static T FromYaml<T>(this string str) => new DeserializerBuilder()
.WithNamingConvention(UnderscoredNamingConvention.Instance)
.Build()
@@ -401,7 +401,7 @@ namespace slskd
}
/// <summary>
- /// Replaces any occurance of an invalid filename character with the specified <see paramref="replacement"/>.
+ /// Replaces any occurrence of an invalid filename character with the specified <see paramref="replacement"/>.
/// </summary>
/// <param name="path">The path to sanitize.</param>
/// <param name="replacement">The character with which to replace invalid characters.</param>
@@ -451,7 +451,7 @@ namespace slskd
/// </summary>
/// <typeparam name="T">The type to which to deserialize the string.</typeparam>
/// <param name="str">The string to deserialize.</param>
- /// <returns>The new object deserialzied from the string.</returns>
+ /// <returns>The new object deserialized from the string.</returns>
public static T FromJson<T>(this string str) => JsonSerializer.Deserialize<T>(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
{
/// <summary>
- /// Adds a command line argument configuration soruce to <paramref name="builder"/>.
+ /// Adds a command line argument configuration source to <paramref name="builder"/>.
/// </summary>
/// <param name="builder">The <see cref="IConfigurationBuilder"/> to which to add.</param>
/// <param name="targetType">The type from which to map properties.</param>
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
}
/// <summary>
- /// Adds an enviroment variable configuration source to <paramref name="builder"/>.
+ /// Adds an environment variable configuration source to <paramref name="builder"/>.
/// </summary>
/// <param name="builder">The <see cref="IConfigurationBuilder"/> to which to add.</param>
/// <param name="configureSource">Configures the source.</param>
@@ -65,7 +65,7 @@ namespace slskd.Configuration
}
/// <summary>
- /// An enviroment variable <see cref="ConfigurationProvider"/>.
+ /// An environment variable <see cref="ConfigurationProvider"/>.
/// </summary>
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;
+ /// <summary>
+ /// Indicates that the application must disconnect and reconnect to the Soulseek server for changes to take effect.
+ /// </summary>
[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;
+ /// <summary>
+ /// Indicates that the application must be restarted for any changes to take effect.
+ /// </summary>
[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;
/// <summary>
/// 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;
/// <summary>
- /// Represents erorrs that originate while attempting to execute retry logic.
+ /// Represents errors that originate while attempting to execute retry logic.
/// </summary>
[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;
/// <summary>
- /// Represents erorrs that originate from slskd logic.
+ /// Represents errors that originate from slskd logic.
/// </summary>
[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
/// <summary>
/// Registers a listener to be called whenever the tracked state changes.
/// </summary>
- /// <param name="listener">Registers a listener to be called whenver state changes.</param>
+ /// <param name="listener">Registers a listener to be called whenever state changes.</param>
/// <returns>An <see cref="IDisposable"/> which should be disposed to stop listening for changes.</returns>
IDisposable OnChange(Action<(T Previous, T Current)> listener);
}
@@ -164,9 +164,9 @@ namespace slskd
private object Lock { get; } = new object();
/// <summary>
- /// Registers a listener to be called whenever the stracked state changes.
+ /// Registers a listener to be called whenever the tracked state changes.
/// </summary>
- /// <param name="listener">Registers a listener to be called whenver state changes.</param>
+ /// <param name="listener">Registers a listener to be called whenever state changes.</param>
/// <returns>An <see cref="IDisposable"/> which should be disposed to stop listening for changes.</returns>
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; }
/// <summary>
- /// 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.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
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
/// <param name="isRetryable">A function returning a value indicating whether the last Exception is retryable.</param>
/// <param name="onFailure">An action to execute on failure.</param>
/// <param name="maxAttempts">The maximum number of retry attempts.</param>
- /// <param name="maxDelayInMilliseconds">The maximum delay in miliseconds.</param>
+ /// <param name="maxDelayInMilliseconds">The maximum delay in milliseconds.</param>
/// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
/// <typeparam name="T">The Type of the logic return value.</typeparam>
/// <returns>The execution context.</returns>
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;
/// <summary>
- /// Validates that the value is a valid nember of the specified <see cref="Enum"/>.
+ /// Validates that the value is a valid member of the specified <see cref="Enum"/>.
/// </summary>
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;
/// <summary>
- /// Extension methods for types involved with validaiton.
+ /// Extension methods for types involved with validation.
/// </summary>
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)
{