11 references to WRN_DeprecatedCollectionInitAddStr
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (2)
311
case ErrorCode.
WRN_DeprecatedCollectionInitAddStr
:
1182
or ErrorCode.
WRN_DeprecatedCollectionInitAddStr
Generated\ErrorFacts.Generated.cs (1)
68
case ErrorCode.
WRN_DeprecatedCollectionInitAddStr
:
Symbols\ObsoleteAttributeHelpers.cs (2)
214
(message: { }, isError: false, isColInit: true) => ErrorCode.
WRN_DeprecatedCollectionInitAddStr
,
231
ErrorCode.ERR_DeprecatedSymbolStr or ErrorCode.
WRN_DeprecatedCollectionInitAddStr
or
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
6814
Diagnostic(ErrorCode.
WRN_DeprecatedCollectionInitAddStr
, "new B()").WithArguments("B.Add(B)", "Don't use this overload"),
Semantics\CollectionExpressionTests.cs (2)
8180
Diagnostic(ErrorCode.
WRN_DeprecatedCollectionInitAddStr
, "1").WithArguments("MyCollection<int>.Add(int)", "do not use").WithLocation(15, 32),
8183
Diagnostic(ErrorCode.
WRN_DeprecatedCollectionInitAddStr
, "x").WithArguments("MyCollection<int>.Add(int)", "do not use").WithLocation(15, 37));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ImplicitObjectCreationTests.cs (2)
5040
Diagnostic(ErrorCode.
WRN_DeprecatedCollectionInitAddStr
, "new A()").WithArguments("MyList<A>.Add(A)", "Message").WithLocation(6, 20),
5049
Diagnostic(ErrorCode.
WRN_DeprecatedCollectionInitAddStr
, "new()").WithArguments("MyList<A>.Add(A)", "Message").WithLocation(9, 20)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Diagnostics\DiagnosticTest.cs (1)
236
Assert.Equal(2, ErrorFacts.GetWarningLevel(ErrorCode.
WRN_DeprecatedCollectionInitAddStr
));