Some checks failed
default / dotnet-default-workflow (push) Has been cancelled
Add a simple in memory dispatcher for scalar requests and stream request.
14 lines
No EOL
497 B
C#
14 lines
No EOL
497 B
C#
// Copyright (c) The Geekeey Authors
|
|
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
namespace Geekeey.Request.Tests;
|
|
|
|
public class StreamOrderingOpenBehavior<TRequest, TOutput>(StreamTestTracker tracker) : IStreamRequestBehavior<TRequest, TOutput>
|
|
where TRequest : IStreamRequest<TOutput>
|
|
{
|
|
public IAsyncEnumerable<TOutput> HandleAsync(TRequest request, StreamHandlerDelegate<TOutput> next, CancellationToken cancellationToken)
|
|
{
|
|
tracker.Log.Add("Open");
|
|
return next(request, cancellationToken);
|
|
}
|
|
} |