diff --git a/src/HotChocolate/Core/src/Abstractions/ServiceKind.cs b/src/HotChocolate/Core/src/Abstractions/ServiceKind.cs index f62e7ffa332..94760f4cc4b 100644 --- a/src/HotChocolate/Core/src/Abstractions/ServiceKind.cs +++ b/src/HotChocolate/Core/src/Abstractions/ServiceKind.cs @@ -16,7 +16,7 @@ public enum ServiceKind Default, /// - /// The service will will be retrieved from the + /// The service will be retrieved from the /// but can only accessed by a single resolver at a time. /// Example for such service is for instance the Entity /// Framework DbContext when scoped on the request. diff --git a/src/HotChocolate/Core/src/Execution/RequestExecutorResolver.cs b/src/HotChocolate/Core/src/Execution/RequestExecutorResolver.cs index 9ffef9601e4..a8763d05cb7 100644 --- a/src/HotChocolate/Core/src/Execution/RequestExecutorResolver.cs +++ b/src/HotChocolate/Core/src/Execution/RequestExecutorResolver.cs @@ -24,8 +24,8 @@ namespace HotChocolate.Execution; internal sealed class RequestExecutorResolver : IRequestExecutorResolver - , IInternalRequestExecutorResolver - , IDisposable + , IInternalRequestExecutorResolver + , IDisposable { private readonly SemaphoreSlim _semaphore = new(1, 1); private readonly ConcurrentDictionary _executors = new(); diff --git a/src/HotChocolate/Core/src/Subscriptions/TopicFormatter.cs b/src/HotChocolate/Core/src/Subscriptions/TopicFormatter.cs index bdbf0a9b238..0695e24967f 100644 --- a/src/HotChocolate/Core/src/Subscriptions/TopicFormatter.cs +++ b/src/HotChocolate/Core/src/Subscriptions/TopicFormatter.cs @@ -19,7 +19,7 @@ public TopicFormatter(string? prefix) public string Format(string topic) { - var length = checked(1 + topic.Length * 4 + _prefix.Length); + var length = checked(1 + (topic.Length * 4) + _prefix.Length); byte[]? topicBuffer = null; var topicSpan = length <= 256 diff --git a/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ServiceHelper.cs b/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ServiceHelper.cs index 6a3f3b7a8fa..36e1e5db8df 100644 --- a/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ServiceHelper.cs +++ b/src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ServiceHelper.cs @@ -12,7 +12,7 @@ namespace HotChocolate.Resolvers.Expressions.Parameters; /// /// The service helper configures the object fields with middleware to handle -/// various service behaviours like pooled services. +/// various service behaviors like pooled services. /// internal static class ServiceHelper { diff --git a/src/HotChocolate/Core/src/Types/Types/Descriptors/Conventions/DescriptorContext.cs b/src/HotChocolate/Core/src/Types/Types/Descriptors/Conventions/DescriptorContext.cs index a2af8cf6e15..31257544968 100644 --- a/src/HotChocolate/Core/src/Types/Types/Descriptors/Conventions/DescriptorContext.cs +++ b/src/HotChocolate/Core/src/Types/Types/Descriptors/Conventions/DescriptorContext.cs @@ -17,10 +17,11 @@ namespace HotChocolate.Types.Descriptors; /// +/// /// The descriptor context is passed around during the schema creation and /// allows access to conventions and context data. -/// -/// Essentially this is the schema building context. +/// +/// Essentially this is the schema building context. /// public sealed class DescriptorContext : IDescriptorContext { diff --git a/src/HotChocolate/Core/src/Validation/DocumentValidator.cs b/src/HotChocolate/Core/src/Validation/DocumentValidator.cs index 529a9aefa81..fb7c5d1de52 100644 --- a/src/HotChocolate/Core/src/Validation/DocumentValidator.cs +++ b/src/HotChocolate/Core/src/Validation/DocumentValidator.cs @@ -18,7 +18,7 @@ public sealed class DocumentValidator : IDocumentValidator { private readonly DocumentValidatorContextPool _contextPool; private readonly IDocumentValidatorRule[] _allRules; - private readonly IDocumentValidatorRule[] _nonCacheableRules; + private readonly IDocumentValidatorRule[] _nonCashableRules; private readonly IValidationResultAggregator[] _aggregators; private readonly int _maxAllowedErrors; @@ -55,13 +55,13 @@ public sealed class DocumentValidator : IDocumentValidator _contextPool = contextPool ?? throw new ArgumentNullException(nameof(contextPool)); _allRules = rules.ToArray(); - _nonCacheableRules = _allRules.Where(t => !t.IsCacheable).ToArray(); + _nonCashableRules = _allRules.Where(t => !t.IsCacheable).ToArray(); _aggregators = resultAggregators.ToArray(); _maxAllowedErrors = errorOptions.MaxAllowedErrors; } /// - public bool HasDynamicRules => _nonCacheableRules.Length > 0 || _aggregators.Length > 0; + public bool HasDynamicRules => _nonCashableRules.Length > 0 || _aggregators.Length > 0; /// public ValueTask ValidateAsync( @@ -69,7 +69,7 @@ public sealed class DocumentValidator : IDocumentValidator DocumentNode document, string documentId, IDictionary contextData, - bool onlyNonCacheable, + bool onlyNonCashable, CancellationToken cancellationToken = default) { if (schema is null) @@ -87,13 +87,13 @@ public sealed class DocumentValidator : IDocumentValidator throw new ArgumentNullException(nameof(documentId)); } - if (onlyNonCacheable && _nonCacheableRules.Length == 0 && _aggregators.Length == 0) + if (onlyNonCashable && _nonCashableRules.Length == 0 && _aggregators.Length == 0) { return new(DocumentValidatorResult.Ok); } var context = _contextPool.Get(); - var rules = onlyNonCacheable ? _nonCacheableRules : _allRules; + var rules = onlyNonCashable ? _nonCashableRules : _allRules; var handleCleanup = true; try