2 types derived from AbstractDoNotCopyValue
Roslyn.Diagnostics.CSharp.Analyzers (1)
CSharpDoNotCopyValue.cs (1)
18
public sealed class CSharpDoNotCopyValue :
AbstractDoNotCopyValue
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
VisualBasicDoNotCopyValue.vb (1)
14
Inherits
AbstractDoNotCopyValue
28 references to AbstractDoNotCopyValue
Roslyn.Diagnostics.Analyzers.UnitTests (28)
DoNotCopyValueTests.cs (28)
156
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.NoAssignValueFromReferenceRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle"));
170
VerifyVB.Diagnostic(
AbstractDoNotCopyValue
.NoAssignValueFromReferenceRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle"));
267
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.NoAssignValueFromReferenceRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle"));
299
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"),
301
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(1).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"));
333
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"),
335
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(1).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"));
387
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"),
389
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(1).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"),
391
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(2).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"),
393
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(3).WithArguments("System.Runtime.InteropServices.GCHandle", "FieldReference"),
395
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(4).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"),
397
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(5).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"),
399
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(6).WithArguments("System.Runtime.InteropServices.GCHandle", "LocalReference"));
608
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(0).WithArguments("CannotCopy", "FieldReference"),
724
("in", "") => [VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(0).WithArguments("CannotCopy", "ParameterReference")],
1097
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.NoAssignValueFromReferenceRule).WithLocation(0).WithArguments("CannotCopy"),
1099
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.NoAssignValueFromReferenceRule).WithLocation(1).WithArguments("CannotCopy"),
1132
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.NoReturnValueFromReferenceRule).WithLocation(0).WithArguments("CannotCopy"),
1166
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(0).WithArguments("CannotCopy", "FieldReference"));
1179
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.AvoidNullableWrapperRule).WithLocation(0).WithArguments("System.Runtime.InteropServices.GCHandle?", "FieldInitializer"));
1209
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.NoFieldOfCopyableTypeRule).WithLocation(0).WithArguments("CannotCopy", "C2.field2"));
1233
VerifyVB.Diagnostic(
AbstractDoNotCopyValue
.NoFieldOfCopyableTypeRule).WithLocation(0).WithArguments("CannotCopy", "Private field2 As CannotCopy"));
1261
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.NoAutoPropertyRule).WithLocation(0).WithArguments("CannotCopy", "C1.Property3"),
1263
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.NoAutoPropertyRule).WithLocation(1).WithArguments("CannotCopy", "C2.Property3"));
1319
VerifyVB.Diagnostic(
AbstractDoNotCopyValue
.NoAutoPropertyRule).WithLocation(0).WithArguments("CannotCopy", "Private Property Property3 As CannotCopy"),
1321
VerifyVB.Diagnostic(
AbstractDoNotCopyValue
.NoAutoPropertyRule).WithLocation(1).WithArguments("CannotCopy", "Private Property Property3 As CannotCopy"));
1430
VerifyCS.Diagnostic(
AbstractDoNotCopyValue
.UnsupportedUseRule).WithLocation(0).WithArguments("S", "LocalReference")