Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC0072 reports on inherited method that cannot get renamed #1086

Open
n0099 opened this issue Mar 24, 2024 · 0 comments
Open

CC0072 reports on inherited method that cannot get renamed #1086

n0099 opened this issue Mar 24, 2024 · 0 comments

Comments

@n0099
Copy link

n0099 commented Mar 24, 2024

Bug

protected sealed class SelectForUpdateCommandInterceptor : DbCommandInterceptor
{ // https://stackoverflow.com/questions/37984312/how-to-implement-select-for-update-in-ef-core/75086260#75086260
    public override ValueTask<InterceptionResult<object>> ScalarExecutingAsync(
        DbCommand command,
        CommandEventData eventData,
        InterceptionResult<object> result,
        CancellationToken cancellationToken = default)
    {
        ManipulateCommand(command);
        return new(result);
    }
}

Current output after fix applied (if it is a code fix bug):

public override ValueTask<InterceptionResult<object>> ScalarExecuting(
    DbCommand command,
    CommandEventData eventData,
    InterceptionResult<object> result,
    CancellationToken cancellationToken = default)
{
    ManipulateCommand(command);
    return new(result);
}

Expected output after fix applied (if it is a code fix bug):

Unchanged since it will break the overriding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant