File tree Expand file tree Collapse file tree
AspNetCoreAnalyzers/CodeFixes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11namespace AspNetCoreAnalyzers
22{
33 using System . Collections . Immutable ;
4+ using System . Composition ;
45 using System . Threading . Tasks ;
56 using Gu . Roslyn . AnalyzerExtensions ;
67 using Gu . Roslyn . CodeFixExtensions ;
8+ using Microsoft . CodeAnalysis ;
79 using Microsoft . CodeAnalysis . CodeActions ;
810 using Microsoft . CodeAnalysis . CodeFixes ;
911 using Microsoft . CodeAnalysis . CSharp . Syntax ;
1012 using Microsoft . CodeAnalysis . Rename ;
1113
14+ [ ExportCodeFixProvider ( LanguageNames . CSharp , Name = nameof ( ParameterNameFix ) ) ]
15+ [ Shared ]
1216 public class ParameterNameFix : CodeFixProvider
1317 {
1418 public override ImmutableArray < string > FixableDiagnosticIds { get ; } = ImmutableArray . Create (
Original file line number Diff line number Diff line change 11namespace AspNetCoreAnalyzers
22{
33 using System . Collections . Immutable ;
4+ using System . Composition ;
45 using System . Threading ;
56 using System . Threading . Tasks ;
67 using Gu . Roslyn . CodeFixExtensions ;
@@ -9,12 +10,16 @@ namespace AspNetCoreAnalyzers
910 using Microsoft . CodeAnalysis . CodeFixes ;
1011 using Microsoft . CodeAnalysis . CSharp . Syntax ;
1112
13+ [ ExportCodeFixProvider ( LanguageNames . CSharp , Name = nameof ( ParameterSyntaxFix ) ) ]
14+ [ Shared ]
1215 public class ParameterSyntaxFix : CodeFixProvider
1316 {
1417 public override ImmutableArray < string > FixableDiagnosticIds { get ; } = ImmutableArray . Create (
1518 ASP004ParameterSyntax . DiagnosticId ,
1619 ASP005ParameterRegex . DiagnosticId ) ;
1720
21+ public override FixAllProvider GetFixAllProvider ( ) => null ;
22+
1823 public override async Task RegisterCodeFixesAsync ( CodeFixContext context )
1924 {
2025 var syntaxRoot = await context . Document . GetSyntaxRootAsync ( context . CancellationToken )
Original file line number Diff line number Diff line change 11namespace AspNetCoreAnalyzers
22{
33 using System . Collections . Immutable ;
4+ using System . Composition ;
45 using System . Threading . Tasks ;
56 using Gu . Roslyn . CodeFixExtensions ;
67 using Microsoft . CodeAnalysis ;
8+ using Microsoft . CodeAnalysis . CodeFixes ;
79 using Microsoft . CodeAnalysis . CSharp ;
810 using Microsoft . CodeAnalysis . CSharp . Syntax ;
911
12+ [ ExportCodeFixProvider ( LanguageNames . CSharp , Name = nameof ( ParameterTypeFix ) ) ]
13+ [ Shared ]
1014 public class ParameterTypeFix : DocumentEditorCodeFixProvider
1115 {
1216 public override ImmutableArray < string > FixableDiagnosticIds { get ; } = ImmutableArray . Create (
You can’t perform that action at this time.
0 commit comments