9 references to WRN_DeprecatedCollectionInitAddStr
Microsoft.CodeAnalysis.CSharp (5)
Errors\ErrorFacts.cs (2)
298case ErrorCode.WRN_DeprecatedCollectionInitAddStr: 1120case ErrorCode.WRN_DeprecatedCollectionInitAddStr:
Generated\ErrorFacts.Generated.cs (1)
68case ErrorCode.WRN_DeprecatedCollectionInitAddStr:
Symbols\ObsoleteAttributeHelpers.cs (2)
175(message: { }, isError: false, isColInit: true) => ErrorCode.WRN_DeprecatedCollectionInitAddStr, 192ErrorCode.ERR_DeprecatedSymbolStr or ErrorCode.WRN_DeprecatedCollectionInitAddStr or
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
6728Diagnostic(ErrorCode.WRN_DeprecatedCollectionInitAddStr, "new B()").WithArguments("B.Add(B)", "Don't use this overload"),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ImplicitObjectCreationTests.cs (2)
4899Diagnostic(ErrorCode.WRN_DeprecatedCollectionInitAddStr, "new A()").WithArguments("MyList<A>.Add(A)", "Message").WithLocation(6, 20), 4908Diagnostic(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));