Skip to content

Commit

Permalink
Merge pull request #73440 from DoctorKrolic/verify-invert-if
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrusNajmabadi authored May 13, 2024
2 parents b6ab47d + 99f2c59 commit 1e0edc4
Show file tree
Hide file tree
Showing 7 changed files with 1,950 additions and 2,020 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Microsoft.CodeAnalysis.CSharp.Extensions;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Formatting;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.CodeAnalysis.InvertIf;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Microsoft.CodeAnalysis.Text;
Expand All @@ -21,15 +22,11 @@ namespace Microsoft.CodeAnalysis.CSharp.InvertIf;
using static SyntaxFactory;

[ExportCodeRefactoringProvider(LanguageNames.CSharp, Name = PredefinedCodeRefactoringProviderNames.InvertIf), Shared]
internal sealed class CSharpInvertIfCodeRefactoringProvider : AbstractInvertIfCodeRefactoringProvider<
[method: ImportingConstructor]
[method: Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
internal sealed class CSharpInvertIfCodeRefactoringProvider() : AbstractInvertIfCodeRefactoringProvider<
SyntaxKind, StatementSyntax, IfStatementSyntax, StatementSyntax>
{
[ImportingConstructor]
[SuppressMessage("RoslynDiagnosticsReliability", "RS0033:Importing constructor should be [Obsolete]", Justification = "Used in test code: https://github.com/dotnet/roslyn/issues/42814")]
public CSharpInvertIfCodeRefactoringProvider()
{
}

protected override string GetTitle()
=> CSharpFeaturesResources.Invert_if;

Expand Down
Loading

0 comments on commit 1e0edc4

Please sign in to comment.