17 references to UnsupportedUseRule
Roslyn.Diagnostics.Analyzers (2)
AbstractDoNotCopyValue.cs (2)
131
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule,
UnsupportedUseRule
, NoBoxingRule, NoUnboxingRule, NoFieldOfCopyableTypeRule, NoAutoPropertyRule);
1660
_context.ReportDiagnostic(node.CreateDiagnostic(
UnsupportedUseRule
, symbol, operationKind));
Roslyn.Diagnostics.Analyzers.UnitTests (15)
DoNotCopyValueTests.cs (15)
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")],
1166
VerifyCS.Diagnostic(AbstractDoNotCopyValue.
UnsupportedUseRule
).WithLocation(0).WithArguments("CannotCopy", "FieldReference"));
1430
VerifyCS.Diagnostic(AbstractDoNotCopyValue.
UnsupportedUseRule
).WithLocation(0).WithArguments("S", "LocalReference")