Skip to content

Commit 09c3585

Browse files
authored
Removed unread private members (#8388)
1 parent 1fc5741 commit 09c3585

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

src/HotChocolate/Core/src/Execution/Processing/SubscriptionExecutor.Subscription.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ public IAsyncEnumerable<IOperationResult> ExecuteAsync()
109109
_requestContext,
110110
_sourceStream,
111111
OnEvent,
112-
this,
113112
_diagnosticEvents,
114113
_errorHandler);
115114

@@ -322,22 +321,19 @@ private sealed class SubscriptionEnumerable : IAsyncEnumerable<IOperationResult>
322321
private readonly RequestContext _requestContext;
323322
private readonly ISourceStream _sourceStream;
324323
private readonly Func<object, Task<IOperationResult>> _onEvent;
325-
private readonly Subscription _subscription;
326324
private readonly IExecutionDiagnosticEvents _diagnosticEvents;
327325
private readonly IErrorHandler _errorHandler;
328326

329327
public SubscriptionEnumerable(
330328
RequestContext requestContext,
331329
ISourceStream sourceStream,
332330
Func<object, Task<IOperationResult>> onEvent,
333-
Subscription subscription,
334331
IExecutionDiagnosticEvents diagnosticEvents,
335332
IErrorHandler errorHandler)
336333
{
337334
_requestContext = requestContext;
338335
_sourceStream = sourceStream;
339336
_onEvent = onEvent;
340-
_subscription = subscription;
341337
_diagnosticEvents = diagnosticEvents;
342338
_errorHandler = errorHandler;
343339
}
@@ -355,7 +351,6 @@ public IAsyncEnumerator<IOperationResult> GetAsyncEnumerator(
355351
_requestContext,
356352
eventStreamEnumerator,
357353
_onEvent,
358-
_subscription,
359354
_diagnosticEvents,
360355
_errorHandler,
361356
cancellationToken);
@@ -374,7 +369,6 @@ private sealed class SubscriptionEnumerator : IAsyncEnumerator<IOperationResult>
374369
private readonly RequestContext _requestContext;
375370
private readonly IAsyncEnumerator<object?> _eventEnumerator;
376371
private readonly Func<object, Task<IOperationResult>> _onEvent;
377-
private readonly Subscription _subscription;
378372
private readonly IExecutionDiagnosticEvents _diagnosticEvents;
379373
private readonly IErrorHandler _errorHandler;
380374
private readonly CancellationToken _requestAborted;
@@ -385,15 +379,13 @@ public SubscriptionEnumerator(
385379
RequestContext requestContext,
386380
IAsyncEnumerator<object?> eventEnumerator,
387381
Func<object, Task<IOperationResult>> onEvent,
388-
Subscription subscription,
389382
IExecutionDiagnosticEvents diagnosticEvents,
390383
IErrorHandler errorHandler,
391384
CancellationToken requestAborted)
392385
{
393386
_requestContext = requestContext;
394387
_eventEnumerator = eventEnumerator;
395388
_onEvent = onEvent;
396-
_subscription = subscription;
397389
_diagnosticEvents = diagnosticEvents;
398390
_errorHandler = errorHandler;
399391
_requestAborted = requestAborted;

src/HotChocolate/Core/test/Types.Tests/Types/DirectiveTypeTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,9 @@ protected override void Configure(
895895

896896
public class DirectiveMiddleware
897897
{
898+
#pragma warning disable IDE0052 // Remove unread private members
898899
private readonly FieldDelegate _next;
900+
#pragma warning restore IDE0052 // Remove unread private members
899901

900902
public DirectiveMiddleware(FieldDelegate next)
901903
{

src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageParser.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace StrawberryShake.Transport.WebSockets.Protocols;
1010
/// </summary>
1111
internal ref struct GraphQLWebSocketMessageParser
1212
{
13-
private readonly ReadOnlySequence<byte> _messageData;
1413
private const byte A = (byte)'a';
1514
private const byte C = (byte)'c';
1615
private const byte D = (byte)'d';
@@ -57,7 +56,6 @@ internal ref struct GraphQLWebSocketMessageParser
5756
/// </param>
5857
private GraphQLWebSocketMessageParser(ReadOnlySequence<byte> messageData)
5958
{
60-
_messageData = messageData;
6159
_reader = new Utf8JsonReader(messageData);
6260
}
6361

0 commit comments

Comments
 (0)