Skip to content

Commit b8ae359

Browse files
committed
Doc blocks and simplify return thanks to @Tornhoof
1 parent 608b467 commit b8ae359

File tree

3 files changed

+14
-34
lines changed

3 files changed

+14
-34
lines changed

projects/RabbitMQ.Client/client/api/IChannel.cs

+10-14
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,6 @@ ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString rou
408408
/// </summary>
409409
void ExchangeDelete(string exchange, bool ifUnused);
410410

411-
/*
412-
* TODO LRB rabbitmq/rabbitmq-dotnet-client#1347
413-
/// <summary>
414-
/// Asynchronously delete an exchange.
415-
/// </summary>
416-
ValueTask ExchangeDeleteAsync(string exchange, bool ifUnused);
417-
*/
418-
419411
/// <summary>
420412
/// Asynchronously delete an exchange.
421413
/// </summary>
@@ -455,20 +447,24 @@ ValueTask BasicPublishAsync<TProperties>(CachedString exchange, CachedString rou
455447
/// <summary>
456448
/// Bind a queue to an exchange.
457449
/// </summary>
450+
/// <param name="queue">The queue.</param>
451+
/// <param name="exchange">The exchange.</param>
452+
/// <param name="routingKey">The routing key.</param>
453+
/// <param name="arguments">The arguments.</param>
458454
/// <remarks>
459-
/// <para>
460-
/// Routing key must be shorter than 255 bytes.
461-
/// </para>
455+
/// Routing key must be shorter than 255 bytes.
462456
/// </remarks>
463457
void QueueBind(string queue, string exchange, string routingKey, IDictionary<string, object> arguments);
464458

465459
/// <summary>
466460
/// Asynchronously bind a queue to an exchange.
467461
/// </summary>
462+
/// <param name="queue">The queue.</param>
463+
/// <param name="exchange">The exchange.</param>
464+
/// <param name="routingKey">The routing key.</param>
465+
/// <param name="arguments">The arguments.</param>
468466
/// <remarks>
469-
/// <para>
470-
/// Routing key must be shorter than 255 bytes.
471-
/// </para>
467+
/// Routing key must be shorter than 255 bytes.
472468
/// </remarks>
473469
ValueTask QueueBindAsync(string queue, string exchange, string routingKey, IDictionary<string, object> arguments);
474470

projects/RabbitMQ.Client/client/impl/RecoveryAwareChannel.cs

+3-15
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,7 @@ public override ValueTask BasicAckAsync(ulong deliveryTag, bool multiple)
8181
}
8282
else
8383
{
84-
#if NET6_0_OR_GREATER
85-
return ValueTask.CompletedTask;
86-
#else
87-
return new ValueTask(Task.CompletedTask);
88-
#endif
84+
return default;
8985
}
9086
}
9187

@@ -107,11 +103,7 @@ public override ValueTask BasicNackAsync(ulong deliveryTag, bool multiple, bool
107103
}
108104
else
109105
{
110-
#if NET6_0_OR_GREATER
111-
return ValueTask.CompletedTask;
112-
#else
113-
return new ValueTask(Task.CompletedTask);
114-
#endif
106+
return default;
115107
}
116108
}
117109

@@ -133,11 +125,7 @@ public override ValueTask BasicRejectAsync(ulong deliveryTag, bool requeue)
133125
}
134126
else
135127
{
136-
#if NET6_0_OR_GREATER
137-
return ValueTask.CompletedTask;
138-
#else
139-
return new ValueTask(Task.CompletedTask);
140-
#endif
128+
return default;
141129
}
142130
}
143131
}

projects/RabbitMQ.Client/client/impl/SocketFrameHandler.cs

+1-5
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,7 @@ public ValueTask WriteAsync(ReadOnlyMemory<byte> memory)
282282
{
283283
if (_closed)
284284
{
285-
#if NET6_0_OR_GREATER
286-
return ValueTask.CompletedTask;
287-
#else
288-
return new ValueTask(Task.CompletedTask);
289-
#endif
285+
return default;
290286
}
291287

292288
return _channelWriter.WriteAsync(memory);

0 commit comments

Comments
 (0)