Table of Contents

Class StateHasChangedOveruseCodeFixProvider

Namespace
Blazing.Mvvm.Analyzers.CodeFixProviders
Assembly
Blazing.Mvvm.Analyzers.dll

Code fix provider for StateHasChanged overuse analyzer. Removes unnecessary StateHasChanged() calls.

[ExportCodeFixProvider("C#", new string[] { }, Name = "StateHasChangedOveruseCodeFixProvider")]
[Shared]
public sealed class StateHasChangedOveruseCodeFixProvider : CodeFixProvider

Inheritance

Inherited Members

Properties

FixableDiagnosticIds

A list of diagnostic IDs that this provider can provide fixes for.

public override ImmutableArray<string> FixableDiagnosticIds { get; }

Property Value

ImmutableArray<string>

Methods

GetFixAllProvider()

Gets an optional Microsoft.CodeAnalysis.CodeFixes.FixAllProvider that can fix all/multiple occurrences of diagnostics fixed by this code fix provider. Return null if the provider doesn't support fix all/multiple occurrences. Otherwise, you can return any of the well known fix all providers from Microsoft.CodeAnalysis.CodeFixes.WellKnownFixAllProviders or implement your own fix all provider.

public override FixAllProvider GetFixAllProvider()

Returns

FixAllProvider

RegisterCodeFixesAsync(CodeFixContext)

Computes one or more fixes for the specified Microsoft.CodeAnalysis.CodeFixes.CodeFixContext.

public override Task RegisterCodeFixesAsync(CodeFixContext context)

Parameters

context CodeFixContext

A Microsoft.CodeAnalysis.CodeFixes.CodeFixContext containing context information about the diagnostics to fix. The context must only contain diagnostics with a Microsoft.CodeAnalysis.Diagnostic.Id included in the Microsoft.CodeAnalysis.CodeFixes.CodeFixProvider.FixableDiagnosticIds for the current provider.

Returns

Task