106 references to ToStrings
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (46)
FieldKeywordTests.cs (6)
10205AssertEx.Equal(["A(2)"], actualFields[0].GetAttributes().ToStrings()); 10206AssertEx.Equal(["A(3)"], actualFields[1].GetAttributes().ToStrings()); 10207AssertEx.Equal(["A(5)", "A(6)"], actualFields[2].GetAttributes().ToStrings()); 10272AssertEx.Equal(["A(2)"], actualFields[0].GetAttributes().ToStrings()); 10273AssertEx.Equal(["A(3)"], actualFields[1].GetAttributes().ToStrings()); 10274AssertEx.Equal(["A(5)", "A(6)"], actualFields[2].GetAttributes().ToStrings());
PartialEventsAndConstructorsTests.cs (29)
3455AssertEx.Equal(string.Join(", ", expected), actual.ToStrings().Join(", ")); 3560AssertEx.Equal(["A(1)", "A(41)", "A(2)", "A(42)"], e.GetAttributes().ToStrings()); 3561AssertEx.Equal(["A(3)", "A(13)"], e.AddMethod!.GetAttributes().ToStrings()); 3562AssertEx.Equal(["A(23)"], e.AddMethod.Parameters.Single().GetAttributes().ToStrings()); 3563AssertEx.Equal(["A(33)"], e.AddMethod.GetReturnTypeAttributes().ToStrings()); 3564AssertEx.Equal(["A(4)", "A(14)"], e.RemoveMethod!.GetAttributes().ToStrings()); 3565AssertEx.Equal(["A(24)"], e.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 3566AssertEx.Equal(["A(34)"], e.RemoveMethod.GetReturnTypeAttributes().ToStrings()); 3571AssertEx.Equal(["A(1)", "A(41)", "A(2)", "A(42)"], eImpl.GetAttributes().ToStrings()); 3572AssertEx.Equal(["A(3)", "A(13)"], eImpl.AddMethod!.GetAttributes().ToStrings()); 3573AssertEx.Equal(["A(23)"], eImpl.AddMethod.Parameters.Single().GetAttributes().ToStrings()); 3574AssertEx.Equal(["A(33)"], eImpl.AddMethod.GetReturnTypeAttributes().ToStrings()); 3575AssertEx.Equal(["A(4)", "A(14)"], eImpl.RemoveMethod!.GetAttributes().ToStrings()); 3576AssertEx.Equal(["A(24)"], eImpl.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 3577AssertEx.Equal(["A(34)"], eImpl.RemoveMethod.GetReturnTypeAttributes().ToStrings()); 3581AssertEx.Equal(["A(1)", "A(41)", "A(2)", "A(42)"], f.GetAttributes().ToStrings()); 3582AssertEx.Equal([.. compiledGeneratedAttr, "A(11)", "A(12)"], f.AddMethod!.GetAttributes().ToStrings()); 3583AssertEx.Equal(["A(22)", "A(21)"], f.AddMethod.Parameters.Single().GetAttributes().ToStrings()); 3584AssertEx.Equal([], f.AddMethod.GetReturnTypeAttributes().ToStrings()); 3585AssertEx.Equal([.. compiledGeneratedAttr, "A(11)", "A(12)"], f.RemoveMethod!.GetAttributes().ToStrings()); 3586AssertEx.Equal(["A(22)", "A(21)"], f.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 3587AssertEx.Equal([], f.RemoveMethod.GetReturnTypeAttributes().ToStrings()); 3592AssertEx.Equal(["A(1)", "A(41)", "A(2)", "A(42)"], fImpl.GetAttributes().ToStrings()); 3593AssertEx.Equal([.. compiledGeneratedAttr, "A(11)", "A(12)"], fImpl.AddMethod!.GetAttributes().ToStrings()); 3594AssertEx.Equal(["A(22)", "A(21)"], fImpl.AddMethod.Parameters.Single().GetAttributes().ToStrings()); 3595AssertEx.Equal([], fImpl.AddMethod.GetReturnTypeAttributes().ToStrings()); 3596AssertEx.Equal([.. compiledGeneratedAttr, "A(11)", "A(12)"], fImpl.RemoveMethod!.GetAttributes().ToStrings()); 3597AssertEx.Equal(["A(22)", "A(21)"], fImpl.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 3598AssertEx.Equal([], fImpl.RemoveMethod.GetReturnTypeAttributes().ToStrings());
Semantics\ExtensionTests.cs (1)
34607implementation.GetAttributes().ToStrings());
Semantics\ExtensionTests2.cs (10)
1005m.GlobalNamespace.GetMember<MethodSymbol>("E.M").Parameters[1].GetAttributes().ToStrings()); 1032m.GlobalNamespace.GetMember<MethodSymbol>("E.M").Parameters[0].GetAttributes().ToStrings()); 1035m.GlobalNamespace.GetMember<MethodSymbol>("E.get_Property").Parameters[0].GetAttributes().ToStrings()); 1169m.GlobalNamespace.GetMember<MethodSymbol>("E.get_P").GetReturnTypeAttributes().ToStrings()); 1794m.GlobalNamespace.GetMember<MethodSymbol>("E.get_P").GetReturnTypeAttributes().ToStrings()); 1861m.GlobalNamespace.GetMember<MethodSymbol>("E.get_P").GetReturnTypeAttributes().ToStrings()); 1910m.GlobalNamespace.GetMember<MethodSymbol>("E.set_P").Parameters[0].GetAttributes().ToStrings()); 1973m.GlobalNamespace.GetMember<MethodSymbol>("E.set_P").Parameters[0].GetAttributes().ToStrings()); 2298m.GlobalNamespace.GetTypeMember("E").GetAttributes().ToStrings()); 2332m.GlobalNamespace.GetTypeMember("E").GetAttributes().ToStrings());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (60)
Symbols\PartialPropertiesTests.cs (38)
3691AssertEx.Equal([declAttribute, implAttribute], property.GetAttributes().ToStrings()); 3692AssertEx.Equal([declAttribute, implAttribute], property.PartialImplementationPart!.GetAttributes().ToStrings()); 3725AssertEx.Equal([declAttribute, implAttribute], property.GetAttributes().ToStrings()); 3728AssertEx.Equal([declAttribute, implAttribute], ((SourcePropertySymbol)property).PartialImplementationPart!.GetAttributes().ToStrings()); 3761AssertEx.Equal(["A(1)", "B(1)", "A(2)", "B(2)"], property.GetAttributes().ToStrings()); 3762AssertEx.Equal(["A(1)", "B(1)", "A(2)", "B(2)"], property.PartialImplementationPart!.GetAttributes().ToStrings()); 3801AssertEx.Equal(["A(1)", "B(1)", "A(2)", "B(2)"], accessor.GetAttributes().ToStrings()); 3802AssertEx.Equal(["A(1)", "B(1)", "A(2)", "B(2)"], accessor.PartialImplementationPart!.GetAttributes().ToStrings()); 3850AssertEx.Equal(["A(1)", "B(1)", "A(2)", "B(2)"], accessor.GetAttributes().ToStrings()); 3851AssertEx.Equal(["A(1)", "B(1)", "A(2)", "B(2)"], accessor.PartialImplementationPart!.GetAttributes().ToStrings()); 3891AssertEx.Equal([], accessor.GetAttributes().ToStrings()); 3892AssertEx.Equal([], accessor.PartialImplementationPart.GetAttributes().ToStrings()); 3893AssertEx.Equal(["A(2)", "B(2)", "A(1)", "B(1)"], accessor.Parameters.Single().GetAttributes().ToStrings()); 3894AssertEx.Equal(["A(2)", "B(2)", "A(1)", "B(1)"], accessor.PartialImplementationPart!.Parameters.Single().GetAttributes().ToStrings()); 3924AssertEx.Equal(["A(1)", "B(1)", "A(2)", "B(2)"], indexer.GetAttributes().ToStrings()); 3925AssertEx.Equal(["A(1)", "B(1)", "A(2)", "B(2)"], indexer.PartialImplementationPart!.GetAttributes().ToStrings()); 3966AssertEx.Equal(["A(2)", "B(2)", "A(1)", "B(1)"], param.GetAttributes().ToStrings()); 4018AssertEx.Equal(["Attr", "Attr"], property.GetAttributes().ToStrings()); 4019AssertEx.Equal(["Attr", "Attr"], property.GetMethod!.GetAttributes().ToStrings()); 4020AssertEx.Equal(["Attr", "Attr"], property.SetMethod!.GetAttributes().ToStrings()); 4021AssertEx.Equal(["Attr", "Attr"], property.SetMethod!.Parameters.Single().GetAttributes().ToStrings()); 4080AssertEx.Equal(["Attr", "Attr"], property.GetAttributes().ToStrings()); 4081AssertEx.Equal(["Attr", "Attr"], property.GetMethod!.GetAttributes().ToStrings()); 4082AssertEx.Equal(["Attr", "Attr"], property.GetMethod!.Parameters[0].GetAttributes().ToStrings()); 4083AssertEx.Equal(["Attr", "Attr"], property.GetMethod!.Parameters[1].GetAttributes().ToStrings()); 4084AssertEx.Equal(["Attr", "Attr"], property.SetMethod!.GetAttributes().ToStrings()); 4085AssertEx.Equal(["Attr", "Attr"], property.SetMethod!.Parameters[0].GetAttributes().ToStrings()); 4086AssertEx.Equal(["Attr", "Attr"], property.SetMethod!.Parameters[1].GetAttributes().ToStrings()); 4087AssertEx.Equal(["Attr", "Attr"], property.SetMethod!.Parameters[2].GetAttributes().ToStrings()); 4120AssertEx.Equal([], property.GetAttributes().ToStrings()); 4399AssertEx.Equal(["System.Runtime.CompilerServices.CallerLineNumberAttribute"], indexer.Parameters[1].GetAttributes().ToStrings()); 4442AssertEx.Equal(["System.Runtime.CompilerServices.CallerLineNumberAttribute"], indexer.Parameters[1].GetAttributes().ToStrings()); 4478AssertEx.Equal(["System.Runtime.CompilerServices.CallerFilePathAttribute"], indexer.Parameters[1].GetAttributes().ToStrings()); 4520AssertEx.Equal(["System.Runtime.CompilerServices.CallerFilePathAttribute"], indexer.Parameters[1].GetAttributes().ToStrings()); 4556AssertEx.Equal(["System.Runtime.CompilerServices.CallerMemberNameAttribute"], indexer.Parameters[1].GetAttributes().ToStrings()); 4598AssertEx.Equal(["System.Runtime.CompilerServices.CallerMemberNameAttribute"], indexer.Parameters[1].GetAttributes().ToStrings()); 4649AssertEx.Equal(["""System.Runtime.CompilerServices.CallerArgumentExpressionAttribute("x")"""], indexer.Parameters[1].GetAttributes().ToStrings()); 4706AssertEx.Equal(["""System.Runtime.CompilerServices.CallerArgumentExpressionAttribute("x")"""], indexer.Parameters[1].GetAttributes().ToStrings());
Symbols\Source\EventTests.cs (22)
2858AssertEx.Equal(["A(1)", "A(5)"], e.GetAttributes().ToStrings()); 2859AssertEx.Equal([.. compiledGeneratedAttr, "A(2)"], e.AddMethod!.GetAttributes().ToStrings()); 2860AssertEx.Equal(["A(3)"], e.AddMethod.Parameters.Single().GetAttributes().ToStrings()); 2861AssertEx.Equal([], e.AddMethod.GetReturnTypeAttributes().ToStrings()); 2862AssertEx.Equal([.. compiledGeneratedAttr, "A(2)"], e.RemoveMethod!.GetAttributes().ToStrings()); 2863AssertEx.Equal(["A(3)"], e.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 2864AssertEx.Equal([], e.RemoveMethod.GetReturnTypeAttributes().ToStrings()); 2865AssertEx.Equal([.. compiledGeneratedAttr, "A(6)"], e.AssociatedField.GetAttributes().ToStrings()); 2868AssertEx.Equal(["A(1)", "A(5)"], f.GetAttributes().ToStrings()); 2869AssertEx.Equal([.. compiledGeneratedAttr, "A(2)"], f.AddMethod!.GetAttributes().ToStrings()); 2870AssertEx.Equal(["A(3)"], f.AddMethod.Parameters.Single().GetAttributes().ToStrings()); 2871AssertEx.Equal([], f.AddMethod.GetReturnTypeAttributes().ToStrings()); 2872AssertEx.Equal([.. compiledGeneratedAttr, "A(2)"], f.RemoveMethod!.GetAttributes().ToStrings()); 2873AssertEx.Equal(["A(3)"], f.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 2874AssertEx.Equal([], f.RemoveMethod.GetReturnTypeAttributes().ToStrings()); 2877AssertEx.Equal(["A(1)", "A(5)"], g.GetAttributes().ToStrings()); 2878AssertEx.Equal(["A(21)", "A(22)"], g.AddMethod!.GetAttributes().ToStrings()); 2879AssertEx.Equal(["A(23)"], g.AddMethod.Parameters.Single().GetAttributes().ToStrings()); 2880AssertEx.Equal(["A(24)"], g.AddMethod.GetReturnTypeAttributes().ToStrings()); 2881AssertEx.Equal(["A(31)", "A(32)"], g.RemoveMethod!.GetAttributes().ToStrings()); 2882AssertEx.Equal(["A(33)"], g.RemoveMethod.Parameters.Single().GetAttributes().ToStrings()); 2883AssertEx.Equal(["A(34)"], g.RemoveMethod.GetReturnTypeAttributes().ToStrings());