Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/DevBetterWeb.Web/DevBetterWeb.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
<PackageReference Include="Dapper" />
<PackageReference Include="GoogleReCaptcha.V3" />
<PackageReference Include="Mediator.Abstractions" />
<PackageReference Include="Mediator.SourceGenerator" />
<PackageReference Include="Mediator.SourceGenerator">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" />
<PackageReference Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" />
Expand Down
35 changes: 25 additions & 10 deletions tests/DevBetterWeb.FunctionalTests/NoOpMediator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,48 @@ public IAsyncEnumerable<TResponse> CreateStream<TResponse>(IStreamRequest<TRespo
throw new System.NotImplementedException();
}

public IAsyncEnumerable<TResponse> CreateStream<TResponse>(IStreamQuery<TResponse> request, CancellationToken cancellationToken = default)
{
throw new System.NotImplementedException();
}

public IAsyncEnumerable<TResponse> CreateStream<TResponse>(IStreamCommand<TResponse> request, CancellationToken cancellationToken = default)
{
throw new System.NotImplementedException();
}

public IAsyncEnumerable<object> CreateStream(object request, CancellationToken cancellationToken = default)
{
throw new System.NotImplementedException();
}

public Task Publish(object notification, CancellationToken cancellationToken = default)
public ValueTask Publish(object notification, CancellationToken cancellationToken = default)
{
return ValueTask.CompletedTask;
}

public ValueTask Publish<TNotification>(TNotification notification, CancellationToken cancellationToken = default) where TNotification : INotification
{
return Task.CompletedTask;
return ValueTask.CompletedTask;
}

public Task Publish<TNotification>(TNotification notification, CancellationToken cancellationToken = default) where TNotification : INotification
public ValueTask<TResponse> Send<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
return ValueTask.FromResult<TResponse>(default!);
}

public Task<TResponse> Send<TResponse>(IRequest<TResponse> request, CancellationToken cancellationToken = default)
public ValueTask<TResponse> Send<TResponse>(ICommand<TResponse> request, CancellationToken cancellationToken = default)
{
return Task.FromResult<TResponse>(default);
return ValueTask.FromResult<TResponse>(default!);
}

public Task Send<TRequest>(TRequest request, CancellationToken cancellationToken = default) where TRequest : IRequest
public ValueTask<TResponse> Send<TResponse>(IQuery<TResponse> request, CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
return ValueTask.FromResult<TResponse>(default!);
}

public Task<object> Send(object request, CancellationToken cancellationToken = default)
public ValueTask<object> Send(object request, CancellationToken cancellationToken = default)
{
return Task.FromResult<object>(default);
return ValueTask.FromResult<object>(default!);
}
}
Loading