File tree Expand file tree Collapse file tree
PropertyChangedAnalyzers.Test
INPC015PropertyIsRecursive Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ public static void NotifyingProperty()
1616namespace N
1717{
1818 using System.ComponentModel;
19- using System.Runtime.CompilerServices;
2019
2120 public class C : INotifyPropertyChanged
2221 {
@@ -59,9 +58,6 @@ public static void GetSetBackingFieldExpressionBodies()
5958 var code = @"
6059namespace N
6160{
62- using System.ComponentModel;
63- using System.Runtime.CompilerServices;
64-
6561 public class C
6662 {
6763 private int p;
@@ -110,7 +106,7 @@ public class C1
110106
111107 public class C2 : C1
112108 {
113- public int P
109+ public override int P
114110 {
115111 get => base.P;
116112 set => base.P = value;
@@ -132,7 +128,7 @@ namespace N
132128
133129 public class C : IReadOnlyList<int>
134130 {
135- private readonly List<int> ints;
131+ private readonly List<int> ints = new() ;
136132
137133 public int Count => ints.Count;
138134
Original file line number Diff line number Diff line change 1- namespace PropertyChangedAnalyzers . Test . INPC016NotifyAfterUpdate
1+ namespace PropertyChangedAnalyzers . Test . INPC016NotifyAfterUpdate
22{
33 using Gu . Roslyn . Asserts ;
44 using NUnit . Framework ;
@@ -92,7 +92,6 @@ public static void OnPropertyChangedPropertyChangedEventArgsBeforeAssign()
9292namespace N
9393{
9494 using System.ComponentModel;
95- using System.Runtime.CompilerServices;
9695
9796 public class C : INotifyPropertyChanged
9897 {
@@ -173,11 +172,11 @@ namespace N.Client
173172{
174173 public class C : N.Core.ViewModelBase
175174 {
176- private string p2;
175+ private string? p2;
177176
178177 public string P1 => $""Hello {this.P2}"";
179178
180- public string P2
179+ public string? P2
181180 {
182181 get { return this.p2; }
183182 set
You can’t perform that action at this time.
0 commit comments