Open sandboxFocus

Method Suggest

Suggest(IDiagnosticSink, CodeFix, IDiagnosticLocation, IDiagnosticSource)

Suggest a code fix without reporting a diagnostic.

Declaration
public static void Suggest(this IDiagnosticSink sink, CodeFix codeFix, IDiagnosticLocation location, IDiagnosticSource source)
Parameters
Type Name Description
IDiagnosticSink sink

The IDiagnosticSink where the suggestion should be added.

CodeFix codeFix

The CodeFix.

IDiagnosticLocation location

The code location for which the code fix should be suggested, typically an IDeclaration.

IDiagnosticSource source

Suggest(IScopedDiagnosticSink, CodeFix)

Suggest a code fix without reporting a diagnostic.

Declaration
public static void Suggest(this IScopedDiagnosticSink sink, CodeFix codeFix)
Parameters
Type Name Description
IScopedDiagnosticSink sink

The ScopedDiagnosticSink where the suggestion should be added.

CodeFix codeFix

The CodeFix.

Suggest(IScopedDiagnosticSink, CodeFix, IDiagnosticLocation)

Suggest a code fix without reporting a diagnostic.

Declaration
public static void Suggest(this IScopedDiagnosticSink sink, CodeFix codeFix, IDiagnosticLocation location)
Parameters
Type Name Description
IScopedDiagnosticSink sink

The ScopedDiagnosticSink where the suggestion should be added.

CodeFix codeFix

The CodeFix.

IDiagnosticLocation location

The code location for which the code fix should be suggested, typically an IDeclaration.