Skip to content

Commit 365e965

Browse files
committed
Target type
1 parent be1179b commit 365e965

59 files changed

Lines changed: 81 additions & 169 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

PropertyChangedAnalyzers.Test/HandlesRecursion.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Linq;
6-
using System.Threading.Tasks;
76
using Gu.Roslyn.Asserts;
87
using Microsoft.CodeAnalysis.Diagnostics;
98
using NUnit.Framework;

PropertyChangedAnalyzers.Test/INPC001ImplementINotifyPropertyChanged/CodeFix.StyletMvvm.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
namespace PropertyChangedAnalyzers.Test.INPC001ImplementINotifyPropertyChanged
22
{
3-
using System.Collections.Immutable;
43
using Gu.Roslyn.Asserts;
5-
using Microsoft.CodeAnalysis;
64
using NUnit.Framework;
75
using PropertyChangedAnalyzers.Test.Helpers;
86

PropertyChangedAnalyzers.Test/INPC001ImplementINotifyPropertyChanged/CodeFix.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
namespace PropertyChangedAnalyzers.Test.INPC001ImplementINotifyPropertyChanged
1+
namespace PropertyChangedAnalyzers.Test.INPC001ImplementINotifyPropertyChanged
22
{
33
using Gu.Roslyn.Asserts;
4-
using Microsoft.CodeAnalysis.CodeFixes;
5-
using Microsoft.CodeAnalysis.Diagnostics;
64
using NUnit.Framework;
75

86
public static partial class CodeFix
97
{
10-
private static readonly DiagnosticAnalyzer Analyzer = new ClassDeclarationAnalyzer();
11-
private static readonly CodeFixProvider Fix = new ImplementINotifyPropertyChangedFix();
8+
private static readonly ClassDeclarationAnalyzer Analyzer = new();
9+
private static readonly ImplementINotifyPropertyChangedFix Fix = new();
1210
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(Descriptors.INPC001ImplementINotifyPropertyChanged);
1311

1412
[Test]

PropertyChangedAnalyzers.Test/INPC001ImplementINotifyPropertyChanged/NoFix.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
namespace PropertyChangedAnalyzers.Test.INPC001ImplementINotifyPropertyChanged
22
{
33
using Gu.Roslyn.Asserts;
4-
using Microsoft.CodeAnalysis.CodeFixes;
5-
using Microsoft.CodeAnalysis.Diagnostics;
64
using NUnit.Framework;
75

86
public static class NoFix
97
{
10-
private static readonly DiagnosticAnalyzer Analyzer = new ClassDeclarationAnalyzer();
11-
private static readonly CodeFixProvider Fix = new ImplementINotifyPropertyChangedFix();
8+
private static readonly ClassDeclarationAnalyzer Analyzer = new();
9+
private static readonly ImplementINotifyPropertyChangedFix Fix = new();
1210
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(Descriptors.INPC001ImplementINotifyPropertyChanged);
1311

1412
[Test]

PropertyChangedAnalyzers.Test/INPC001ImplementINotifyPropertyChanged/Valid.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
namespace PropertyChangedAnalyzers.Test.INPC001ImplementINotifyPropertyChanged
22
{
33
using Gu.Roslyn.Asserts;
4-
using Microsoft.CodeAnalysis.Diagnostics;
54
using NUnit.Framework;
65

76
public static partial class Valid
87
{
9-
private static readonly DiagnosticAnalyzer Analyzer = new ClassDeclarationAnalyzer();
8+
private static readonly ClassDeclarationAnalyzer Analyzer = new();
109

1110
[TestCase("null")]
1211
[TestCase("string.Empty")]

PropertyChangedAnalyzers.Test/INPC002MutablePublicPropertyShouldNotify/CodeFix.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
namespace PropertyChangedAnalyzers.Test.INPC002MutablePublicPropertyShouldNotify
22
{
33
using Gu.Roslyn.Asserts;
4-
using Microsoft.CodeAnalysis.CodeFixes;
5-
using Microsoft.CodeAnalysis.Diagnostics;
64
using NUnit.Framework;
75

86
public static partial class CodeFix
97
{
10-
private static readonly DiagnosticAnalyzer Analyzer = new SetAccessorAnalyzer();
11-
private static readonly CodeFixProvider Fix = new MakePropertyNotifyFix();
8+
private static readonly SetAccessorAnalyzer Analyzer = new();
9+
private static readonly MakePropertyNotifyFix Fix = new();
1210
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(Descriptors.INPC002MutablePublicPropertyShouldNotify);
1311

1412
[Test]

PropertyChangedAnalyzers.Test/INPC002MutablePublicPropertyShouldNotify/FixAll.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
namespace PropertyChangedAnalyzers.Test.INPC002MutablePublicPropertyShouldNotify
22
{
33
using Gu.Roslyn.Asserts;
4-
using Microsoft.CodeAnalysis.CodeFixes;
5-
using Microsoft.CodeAnalysis.Diagnostics;
64
using NUnit.Framework;
75

86
public static class FixAll
97
{
10-
private static readonly DiagnosticAnalyzer Analyzer = new SetAccessorAnalyzer();
11-
private static readonly CodeFixProvider Fix = new MakePropertyNotifyFix();
8+
private static readonly SetAccessorAnalyzer Analyzer = new();
9+
private static readonly MakePropertyNotifyFix Fix = new();
1210
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(Descriptors.INPC002MutablePublicPropertyShouldNotify);
1311

1412
[Test]

PropertyChangedAnalyzers.Test/INPC002MutablePublicPropertyShouldNotify/NoFix.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
namespace PropertyChangedAnalyzers.Test.INPC002MutablePublicPropertyShouldNotify
22
{
33
using Gu.Roslyn.Asserts;
4-
using Microsoft.CodeAnalysis.CodeFixes;
5-
using Microsoft.CodeAnalysis.Diagnostics;
64
using NUnit.Framework;
75

86
public static partial class NoFix
97
{
10-
private static readonly DiagnosticAnalyzer Analyzer = new SetAccessorAnalyzer();
11-
private static readonly CodeFixProvider Fix = new MakePropertyNotifyFix();
8+
private static readonly SetAccessorAnalyzer Analyzer = new();
9+
private static readonly MakePropertyNotifyFix Fix = new();
1210
private static readonly ExpectedDiagnostic ExpectedDiagnostic = ExpectedDiagnostic.Create(Descriptors.INPC002MutablePublicPropertyShouldNotify);
1311

1412
[Test]

PropertyChangedAnalyzers.Test/INPC002MutablePublicPropertyShouldNotify/Valid.MvvmLight.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
namespace PropertyChangedAnalyzers.Test.INPC002MutablePublicPropertyShouldNotify
22
{
3-
using System.Collections.Immutable;
43
using Gu.Roslyn.Asserts;
5-
using Microsoft.CodeAnalysis;
64
using NUnit.Framework;
75
using PropertyChangedAnalyzers.Test.Helpers;
86

PropertyChangedAnalyzers.Test/INPC002MutablePublicPropertyShouldNotify/Valid.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
{
33
using Gu.Roslyn.Asserts;
44
using Microsoft.CodeAnalysis;
5-
using Microsoft.CodeAnalysis.Diagnostics;
65
using NUnit.Framework;
76

87
public static partial class Valid
98
{
10-
private static readonly DiagnosticAnalyzer Analyzer = new SetAccessorAnalyzer();
9+
private static readonly SetAccessorAnalyzer Analyzer = new();
1110
private static readonly DiagnosticDescriptor Descriptor = Descriptors.INPC002MutablePublicPropertyShouldNotify;
1211

1312
[TestCase("null")]

0 commit comments

Comments
 (0)