Compare commits
1 commit
5c2911ea6c
...
4d33d5ab4c
| Author | SHA1 | Date | |
|---|---|---|---|
|
4d33d5ab4c |
1 changed files with 3 additions and 1 deletions
|
|
@ -1,12 +1,14 @@
|
|||
// Copyright (c) The Geekeey Authors
|
||||
// SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Geekeey.Request.Dispatcher.Tests;
|
||||
|
||||
public class StreamOpenBehavior<TRequest, TResponse>(StreamTestTracker tracker) : IStreamRequestBehavior<TRequest, TResponse>
|
||||
where TRequest : IStreamRequest<TResponse>
|
||||
{
|
||||
public async IAsyncEnumerable<TResponse> HandleAsync(TRequest request, StreamHandlerDelegate<TResponse> next, CancellationToken cancellationToken)
|
||||
public async IAsyncEnumerable<TResponse> HandleAsync(TRequest request, StreamHandlerDelegate<TResponse> next, [EnumeratorCancellation] CancellationToken cancellationToken)
|
||||
{
|
||||
tracker.Executed = true;
|
||||
await foreach (var response in next(request, cancellationToken))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue