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