A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/SonarSource/sonar-dotnet/issues/7633 below:

Interfaces that provide type parameters from base interface · Issue #7633 · SonarSource/sonar-dotnet · GitHub

Description

Rule S4023 is violated if an interface implements another interface, providing generic type parameters, without declaring members of its own.

Repro steps
public interface IEndpointHandler<in TArgument, TResult>
{
    Task<TResult> InvokeAsync(TArgument argument, CancellationToken cancellationToken);
}

// FP: S4023
public interface ILoggingEndpointHandler : IEndpointHandler<LoggingRequest, LoggingResponse>
{
}
Expected behavior

No warning, because ILoggingEndpointHandler is not a marker interface.

Actual behavior

Warning S4023.

Known workarounds Related information

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4