Base:
376 references to ToString
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (44)
CodeGen\CodeGenAsyncIteratorTests.cs (18)
10738m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<M2>d__0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 10784m.GlobalNamespace.GetMember("Test1.<M2>d__0.x").GetAttributes().Select(a => a.ToString())); 10788m.GlobalNamespace.GetMember("Test1.<M2>d__0.<>3__x").GetAttributes().Select(a => a.ToString())); 10853m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 10857m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<<Test>g__local|0_0>d").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 10908m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|0_0").Parameters.Single().GetAttributes().Select(a => a.ToString())); 10912m.GlobalNamespace.GetMember("Test1.<<Test>g__local|0_0>d.x").GetAttributes().Select(a => a.ToString())); 10916m.GlobalNamespace.GetMember("Test1.<<Test>g__local|0_0>d.<>3__x").GetAttributes().Select(a => a.ToString())); 10967m.GlobalNamespace.GetMember("Test1.<>c__DisplayClass0_0.x").GetAttributes().Select(a => a.ToString())); 11028m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<M2>d__1").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 11099m.GlobalNamespace.GetMember("Test1.<M2>d__1.x").GetAttributes().Select(a => a.ToString())); 11103m.GlobalNamespace.GetMember("Test1.<M2>d__1.<>3__x").GetAttributes().Select(a => a.ToString())); 11198m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 11202m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<<Test>g__local|1_0>d").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 11256m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|1_0").Parameters.Single().GetAttributes().Select(a => a.ToString())); 11260m.GlobalNamespace.GetMember("Test1.<<Test>g__local|1_0>d.x").GetAttributes().Select(a => a.ToString())); 11264m.GlobalNamespace.GetMember("Test1.<<Test>g__local|1_0>d.<>3__x").GetAttributes().Select(a => a.ToString())); 11345m.GlobalNamespace.GetMember("Test1.<>c__DisplayClass1_0.x").GetAttributes().Select(a => a.ToString()));
CodeGen\CodeGenAsyncTests.cs (14)
7938m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<M2>d__0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 7982m.GlobalNamespace.GetMember("Test1.<M2>d__0.x").GetAttributes().Select(a => a.ToString())); 8045m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 8049m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<<Test>g__local|0_0>d").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 8098m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|0_0").Parameters.Single().GetAttributes().Select(a => a.ToString())); 8102m.GlobalNamespace.GetMember("Test1.<<Test>g__local|0_0>d.x").GetAttributes().Select(a => a.ToString())); 8151m.GlobalNamespace.GetMember("Test1.<>c__DisplayClass0_0.x").GetAttributes().Select(a => a.ToString())); 8210m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<M2>d__1").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 8277m.GlobalNamespace.GetMember("Test1.<M2>d__1.x").GetAttributes().Select(a => a.ToString())); 8369m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 8373m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<<Test>g__local|1_0>d").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 8425m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|1_0").Parameters.Single().GetAttributes().Select(a => a.ToString())); 8429m.GlobalNamespace.GetMember("Test1.<<Test>g__local|1_0>d.x").GetAttributes().Select(a => a.ToString())); 8506m.GlobalNamespace.GetMember("Test1.<>c__DisplayClass1_0.x").GetAttributes().Select(a => a.ToString()));
CodeGen\CodeGenFunctionPointersTests.cs (4)
5414string getAttribute(string fieldName) => c.GetField(fieldName).GetAttributes().Single().ToString()!; 5474Assert.Equal(expectedAttribute, field.GetAttributes().Single().ToString()); 5560Assert.Equal(expectedAttribute, f.GetAttributes().Single().ToString()); 5609Assert.Equal("System.Runtime.CompilerServices.DynamicAttribute({false, false, false, false, false, true, false, true})", param.GetAttributes().Single().ToString());
CodeGen\CodeGenTupleTest.cs (8)
13203Assert.Equal("System.ObsoleteAttribute", m10Tuple.GetAttributes().Single().ToString()); 13217Assert.Equal("System.ObsoleteAttribute", m10Item1.GetAttributes().Single().ToString()); 13218Assert.Equal("System.ObsoleteAttribute", m102Item20.GetAttributes().Single().ToString()); 13219Assert.Equal("System.ObsoleteAttribute", m102a.GetAttributes().Single().ToString()); 13256Assert.Equal("System.ObsoleteAttribute", m10M2.GetAttributes().Single().ToString()); 13268Assert.Equal("System.ObsoleteAttribute", m10P2.GetAttributes().Single().ToString()); 13280Assert.Equal("System.ObsoleteAttribute", m10E2.GetAttributes().Single().ToString()); 28975Assert.Equal(expectedAttribute, field.GetAttributes().Single().ToString());
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (11)
CodeGen\CodeGenMethodGroupConversionCachingTests.cs (11)
6389m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<M2>O__0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 6434m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<local>O__0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 6479m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<Test>O__0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 6524m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<Test>O__0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 6567m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>O__1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 6610m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<M2>O__1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 6658m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<local>O__1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 6706m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<Test>O__1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 6754m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>O__1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 6802m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<Test>O__1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 6850m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>O__1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString()));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (175)
Attributes\AttributeTests.cs (27)
350Assert.Equal("System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(C))", attribute.ToString()); 492Assert.Equal(@"System.Runtime.CompilerServices.InternalsVisibleToAttribute(""Roslyn.Compilers.UnitTests"")", attrs[0].ToString()); 494Assert.Equal(@"System.Runtime.CompilerServices.InternalsVisibleToAttribute(""Roslyn.Compilers.CSharp"")", attrs[1].ToString()); 496Assert.Equal(@"System.Runtime.CompilerServices.InternalsVisibleToAttribute(""Roslyn.Compilers.CSharp.UnitTests"")", attrs[2].ToString()); 498Assert.Equal(@"System.Runtime.CompilerServices.InternalsVisibleToAttribute(""Roslyn.Compilers.CSharp.Test.Utilities"")", attrs[3].ToString()); 500Assert.Equal(@"System.Runtime.CompilerServices.InternalsVisibleToAttribute(""Roslyn.Compilers.VisualBasic"")", attrs[4].ToString()); 1436Assert.Equal(@"System.Reflection.AssemblyAlgorithmIdAttribute(System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5)", a.ToString()); 1440Assert.Equal(@"System.Reflection.AssemblyCultureAttribute("""")", a.ToString()); 1444Assert.Equal(@"System.Reflection.AssemblyDelaySignAttribute(true)", a.ToString()); 1448Assert.Equal(@"System.Reflection.AssemblyFlagsAttribute(System.Reflection.AssemblyNameFlags.Retargetable)", a.ToString()); 1452Assert.Equal(@"System.Reflection.AssemblyKeyFileAttribute(""MyKey.snk"")", a.ToString()); 1456Assert.Equal(@"System.Reflection.AssemblyKeyNameAttribute(""Key Name"")", a.ToString()); 1460Assert.Equal(@"System.Reflection.AssemblyVersionAttribute(""1.2.*"")", a.ToString()); 1464Assert.Equal(@"System.Reflection.AssemblyFileVersionAttribute(""4.3.2.100"")", a.ToString()); 1709Assert.Equal("AObjectAttribute(typeof(object), O = null)", attrs.First().ToString()); 1715Assert.Equal("AObjectAttribute({typeof(string)})", attrs.First().ToString()); 1720Assert.Equal(@"AObjectAttribute({1, ""two"", typeof(string), 3.1415926})", attrs.First().ToString()); 1723Assert.Equal(@"AObjectAttribute({{typeof(string)}})", attrs.First().ToString()); 1820Assert.Equal("B(3)", prop3.GetAttributes().Single().ToString()); 1828Assert.Equal("B(4)", prop4.GetAttributes().Single().ToString()); 2464Assert.Equal("A(2)", prop1.GetAttributes().Single().ToString()); 3218Assert.Equal(@"CustomAttribute.DerivedAttribute({1, null, ""Hi""}, ObjectField = 2)", attrs.First().ToString()); 3910Assert.Equal("AttributeTest.var", attr.ToString()); 4092Assert.Equal(@"System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Event, Inherited = false, AllowMultiple = true)", attr.ToString()); 4098Assert.Equal(@"AttributeTest.A(AttributeTest.X.Three)", attrs.First().ToString()); 4104Assert.Equal(@"AttributeTest.A(5)", attrs.First().ToString()); 10000Assert.Equal("XAttribute", mm.TypeParameters.Single().GetAttributes().Single().ToString());
Attributes\AttributeTests_Assembly.cs (38)
1090Assert.Equal(@"System.Reflection.AssemblyTitleAttribute(""AssemblyTitle"")", a.ToString()); 1093Assert.Equal(@"System.Security.Permissions.FileIOPermissionAttribute(System.Security.Permissions.SecurityAction.RequestOptional)", a.ToString()); 1096Assert.Equal(@"UserDefinedAssemblyAttrNoAllowMultipleAttribute(""UserDefinedAssemblyAttrNoAllowMultiple"")", a.ToString()); 1099Assert.Equal(@"UserDefinedAssemblyAttrAllowMultipleAttribute(""UserDefinedAssemblyAttrAllowMultiple"")", a.ToString()); 1211Assert.Equal(@"UserDefinedAssemblyAttrNoAllowMultipleAttribute(""UserDefinedAssemblyAttrNoAllowMultiple"")", a.ToString()); 1214Assert.Equal(@"UserDefinedAssemblyAttrAllowMultipleAttribute(""UserDefinedAssemblyAttrAllowMultiple"")", a.ToString()); 1290Assert.Equal(@"System.Reflection.AssemblyTitleAttribute(""AssemblyTitle"")", a.ToString()); 1293Assert.Equal(@"System.Security.Permissions.FileIOPermissionAttribute(System.Security.Permissions.SecurityAction.RequestOptional)", a.ToString()); 1296Assert.Equal(@"UserDefinedAssemblyAttrNoAllowMultipleAttribute(""UserDefinedAssemblyAttrNoAllowMultiple"")", a.ToString()); 1299Assert.Equal(@"UserDefinedAssemblyAttrAllowMultipleAttribute(""UserDefinedAssemblyAttrAllowMultiple"")", a.ToString()); 1337Assert.Equal(@"System.Reflection.AssemblyTitleAttribute(""AssemblyTitle (from source)"")", a.ToString()); 1340Assert.Equal(@"System.Security.Permissions.FileIOPermissionAttribute(System.Security.Permissions.SecurityAction.RequestOptional)", a.ToString()); 1343Assert.Equal(@"UserDefinedAssemblyAttrNoAllowMultipleAttribute(""UserDefinedAssemblyAttrNoAllowMultiple"")", a.ToString()); 1346Assert.Equal(@"UserDefinedAssemblyAttrAllowMultipleAttribute(""UserDefinedAssemblyAttrAllowMultiple"")", a.ToString()); 1384Assert.Equal(@"System.Reflection.AssemblyTitleAttribute(""AssemblyTitle"")", a.ToString()); 1387Assert.Equal(@"System.Security.Permissions.FileIOPermissionAttribute(System.Security.Permissions.SecurityAction.RequestOptional)", a.ToString()); 1390Assert.Equal(@"UserDefinedAssemblyAttrNoAllowMultipleAttribute(""UserDefinedAssemblyAttrNoAllowMultiple"")", a.ToString()); 1394(@"UserDefinedAssemblyAttrAllowMultipleAttribute(""UserDefinedAssemblyAttrAllowMultiple"")" == a.ToString()) || 1395(@"UserDefinedAssemblyAttrAllowMultipleAttribute(""UserDefinedAssemblyAttrAllowMultiple (from source)"")" == a.ToString()), 1629AssertEx.Equal(expected, metadataAttributes.Select(a => a.ToString())); 1847builder.AppendLine(attr.ToString()); 1894var attrs = moduleSymbol.ContainingAssembly.GetAttributes().Select(a => a.ToString()).ToArray(); 2179Assert.Equal("System.Reflection.AssemblyDescriptionAttribute(\"Module1\")", list[0].ToString()); 2211Assert.Equal("System.Reflection.AssemblyDescriptionAttribute(\"Module2\")", list[0].ToString()); 2241Assert.Equal("System.Reflection.AssemblyDescriptionAttribute(\"Module3\")", list[0].ToString()); 2273Assert.Equal("System.Reflection.AssemblyDescriptionAttribute(\"Module1\")", list[0].ToString()); 2299Assert.Equal("System.Reflection.AssemblyFileVersionAttribute(\"4.3.2.1\")", attrlist.First().ToString()); 2348AssertEx.Equal("System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)", attrs[0].ToString()); 2349AssertEx.Equal("System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = true)", attrs[1].ToString()); 2350AssertEx.Equal("System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)", attrs[2].ToString()); 2351AssertEx.Equal("A1(1)", attrs[3].ToString()); 2404AssertEx.Equal("System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)", attrs[0].ToString()); 2405AssertEx.Equal("System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = true)", attrs[1].ToString()); 2406AssertEx.Equal("System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)", attrs[2].ToString()); 2407AssertEx.Equal("A1(typeof(C1))", attrs[3].ToString()); 2432AssertEx.Equal("System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)", attrs[0].ToString()); 2433AssertEx.Equal("System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = true)", attrs[1].ToString()); 2434AssertEx.Equal("System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)", attrs[2].ToString());
Attributes\AttributeTests_CallerInfoAttributes.cs (4)
3243AssertEx.Equal(["System.Runtime.CompilerServices.CallerLineNumberAttribute"], goo.Parameters[0].GetAttributes().SelectAsArray(attr => attr.ToString())); 3244AssertEx.Equal(["System.Runtime.CompilerServices.CallerMemberNameAttribute"], goo.Parameters[1].GetAttributes().SelectAsArray(attr => attr.ToString())); 3245AssertEx.Equal(["System.Runtime.CompilerServices.CallerFilePathAttribute"], goo.Parameters[2].GetAttributes().SelectAsArray(attr => attr.ToString())); 5950AssertEx.Equal(["""System.Runtime.CompilerServices.CallerArgumentExpressionAttribute("value")"""], indexer.Parameters[1].GetAttributes().SelectAsArray(attr => attr.ToString()));
Attributes\AttributeTests_WellKnownAttributes.cs (1)
4900AssertEx.SetEqual(expectedAttributes, typeC.GetAttributes().Select(a => a.ToString()));
FlowAnalysis\FlowTests.cs (3)
5847Assert.Equal("A(10, Prop = 40)", attributes[0].Item1.ToString()); 5848Assert.Equal("A(20, Prop = 50)", attributes[1].Item1.ToString()); 5849Assert.Equal("A(30, Prop = 60)", attributes[2].Item1.ToString());
Semantics\ExtensionTests.cs (15)
6164AssertEx.Equal("System.Runtime.CompilerServices.IteratorStateMachineAttribute(typeof(Extensions.<M>d__1))", implementation.GetAttributes().Single().ToString()); 6579AssertEx.Equal("System.Runtime.CompilerServices.AsyncStateMachineAttribute(typeof(Extensions.<M>d__1))", implementation.GetAttributes().Single().ToString()); 7710AssertEx.Equal("System.Runtime.CompilerServices.IteratorStateMachineAttribute(typeof(Extensions.<M>d__1<,>))", implementation.GetAttributes().Single().ToString()); 8113AssertEx.Equal("System.Runtime.CompilerServices.AsyncStateMachineAttribute(typeof(Extensions.<M>d__1<,>))", implementation.GetAttributes().Single().ToString()); 9551AssertEx.Equal("System.Runtime.CompilerServices.IteratorStateMachineAttribute(typeof(Extensions.<M>d__1))", implementation.GetAttributes().Single().ToString()); 9930AssertEx.Equal("System.Runtime.CompilerServices.AsyncStateMachineAttribute(typeof(Extensions.<M>d__1))", implementation.GetAttributes().Single().ToString()); 34026AssertEx.Equal("System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute(0)", implementations[0].GetAttributes().Single().ToString()); 34029AssertEx.Equal("System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute(1)", implementations[1].GetAttributes().Single().ToString()); 34258AssertEx.Equal("System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute(0)", implementations[0].GetAttributes().Single().ToString()); 34261AssertEx.Equal("System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute(1)", implementations[1].GetAttributes().Single().ToString()); 34426AssertEx.Equal("System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute(1)", implementations[0].GetAttributes().Single().ToString()); 34472AssertEx.Equal("System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute(1)", implementations[0].GetAttributes().Single().ToString()); 34475AssertEx.Equal("System.Runtime.CompilerServices.OverloadResolutionPriorityAttribute(0)", implementations[1].GetAttributes().Single().ToString()); 48528AssertEx.Equal("System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute(false)", extensions[0].ExtensionParameter.GetAttributes().Single().ToString()); 48534AssertEx.Equal("System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute(true)", extensions[1].ExtensionParameter.GetAttributes().Single().ToString());
Semantics\ExtensionTests2.cs (52)
4278AssertEx.SetEqual([], extension.GetAttributes().Select(a => a.ToString())); 24639Assert.Equal(["AAttribute", "BAttribute"], extension.TypeParameters[0].GetAttributes().Select(a => a.ToString())); 24640Assert.Equal(["AAttribute", "BAttribute"], extension.ExtensionParameter.GetAttributes().Select(a => a.ToString())); 24728Assert.Equal(["""MyAttribute(10, "hello", P = 20, P2 = "hello2")"""], extension.ExtensionParameter.GetAttributes().Select(a => a.ToString())); 25353Assert.Equal(["System.Diagnostics.CodeAnalysis.UnscopedRefAttribute"], extension.ExtensionParameter.GetAttributes().Select(a => a.ToString())); 25382Assert.Equal(["System.Diagnostics.CodeAnalysis.AllowNullAttribute"], extension.ExtensionParameter.GetAttributes().Select(a => a.ToString())); 26778Assert.Equal([], method.GetAttributes().Select(a => a.ToString())); 26806Assert.Equal([], members[0].GetAttributes().Select(a => a.ToString())); 26807Assert.Equal([], members[1].GetAttributes().Select(a => a.ToString())); 26813Assert.Equal([], members[0].GetAttributes().Select(a => a.ToString())); 26814Assert.Equal([], members[1].GetAttributes().Select(a => a.ToString())); 26841Assert.Equal([], member.GetAttributes().Select(a => a.ToString())); 27348Assert.Equal(["AAttribute(1)"], extensions[0].ExtensionParameter.GetAttributes().Select(a => a.ToString())); 27349Assert.Equal(["AAttribute(2)"], extensions[1].ExtensionParameter.GetAttributes().Select(a => a.ToString())); 32583Assert.Equal("AAttribute", extension.TypeParameters.Single().GetAttributes().Single().ToString()); 32587Assert.Equal("AAttribute", implementation.TypeParameters.Single().GetAttributes().Single().ToString()); 32617Assert.Equal("AAttribute", extensionMethod.TypeParameters.Single().GetAttributes().Single().ToString()); 32621Assert.Equal("AAttribute", implementation.TypeParameters.Single().GetAttributes().Single().ToString()); 32650Assert.Equal("AAttribute", extension.ExtensionParameter.GetAttributes().Single().ToString()); 32654Assert.Equal("AAttribute", implementation.Parameters.Single().GetAttributes().Single().ToString()); 32684Assert.Equal("AAttribute", extensionMethod.Parameters.Last().GetAttributes().Single().ToString()); 32688Assert.Equal("AAttribute", implementation.Parameters.Last().GetAttributes().Single().ToString()); 32719Assert.Equal("AAttribute", extensionMethod.GetAttributes().Single().ToString()); 32723Assert.Equal("AAttribute", implementation.GetAttributes().Single().ToString()); 32754Assert.Equal("AAttribute", extensionProperty.GetAttributes().Single().ToString()); 32787Assert.Equal("AAttribute", extension.TypeParameters.Single().GetAttributes().Single().ToString()); 32791Assert.Equal("AAttribute", getterImplementation.TypeParameters.Single().GetAttributes().Single().ToString()); 32827Assert.Equal("AAttribute", extensionAccessor.GetAttributes().Single().ToString()); 32831Assert.Equal("AAttribute", getterImplementation.GetAttributes().Single().ToString()); 32860Assert.Equal("AAttribute", extension.TypeParameters.Single().GetAttributes().Single().ToString()); 32864Assert.Equal("AAttribute", implementation.TypeParameters.Single().GetAttributes().Single().ToString()); 32894Assert.Equal("AAttribute", extension.ExtensionParameter.GetAttributes().Single().ToString()); 32939Assert.Equal("AAttribute", extensionOperator.GetAttributes().Single().ToString()); 32943Assert.Equal("AAttribute", implementation.GetAttributes().Single().ToString()); 32975Assert.Equal("AAttribute", extensionOperator.Parameters.First().GetAttributes().Single().ToString()); 32976Assert.Equal("BAttribute", extensionOperator.Parameters.Last().GetAttributes().Single().ToString()); 32980Assert.Equal("AAttribute", implementation.Parameters.First().GetAttributes().Single().ToString()); 32981Assert.Equal("BAttribute", implementation.Parameters.Last().GetAttributes().Single().ToString()); 33122Assert.Equal("AAttribute", extensionIndexer.GetAttributes().Single().ToString()); 33158Assert.Equal("AAttribute", extension.ExtensionParameter.GetAttributes().Single().ToString()); 33162Assert.Equal("BAttribute", extensionIndexer.Parameters.Single().GetAttributes().Single().ToString()); 33165Assert.Equal("BAttribute", extensionGetter.Parameters.Single().GetAttributes().Single().ToString()); 33169Assert.Equal("AAttribute", implementation.Parameters.First().GetAttributes().Single().ToString()); 33170Assert.Equal("BAttribute", implementation.Parameters.Last().GetAttributes().Single().ToString()); 33199Assert.Equal("AAttribute", extension.TypeParameters.Single().GetAttributes().Single().ToString()); 33203Assert.Equal("AAttribute", implementation.TypeParameters.Single().GetAttributes().Single().ToString()); 33238Assert.Equal("AAttribute", extensionGetter.GetAttributes().Single().ToString()); 33242Assert.Equal("AAttribute", implementation.GetAttributes().Single().ToString()); 33361Assert.Equal("AAttribute", extensionGetter.GetReturnTypeAttributes().Single().ToString()); 33365Assert.Equal("AAttribute", implementation.GetReturnTypeAttributes().Single().ToString()); 33397Assert.Equal("AAttribute", extensionMethod.GetReturnTypeAttributes().Single().ToString()); 33401Assert.Equal("AAttribute", implementation.GetReturnTypeAttributes().Single().ToString());
Semantics\ParamsCollectionTests.cs (17)
9013Assert.Equal("System.Diagnostics.CodeAnalysis.UnscopedRefAttribute", p1.GetAttributes().Single().ToString()); 10388AssertEx.Equal("System.Runtime.CompilerServices.ParamCollectionAttribute", test1.GetCustomAttributesToEmit(null).Single().ToString()); 10389AssertEx.Equal("System.ParamArrayAttribute", test2.GetCustomAttributesToEmit(null).Single().ToString()); 10402AssertEx.Equal("System.Runtime.CompilerServices.ParamCollectionAttribute", test1.GetCustomAttributesToEmit(null).Single().ToString()); 10403AssertEx.Equal("System.ParamArrayAttribute", test2.GetCustomAttributesToEmit(null).Single().ToString()); 10512AssertEx.Equal(attributes, test1.GetCustomAttributesToEmit(null).Select(a => a.ToString())); 10513AssertEx.Equal(attributes, test2.GetCustomAttributesToEmit(null).Select(a => a.ToString())); 10526AssertEx.Equal(attributes, test1.GetCustomAttributesToEmit(null).Select(a => a.ToString())); 10527AssertEx.Equal(attributes, test2.GetCustomAttributesToEmit(null).Select(a => a.ToString())); 10636AssertEx.Equal(attributes, test1.GetCustomAttributesToEmit(null).Select(a => a.ToString())); 10637AssertEx.Equal(attributes, test2.GetCustomAttributesToEmit(null).Select(a => a.ToString())); 10650AssertEx.Equal(attributes, test1.GetCustomAttributesToEmit(null).Select(a => a.ToString())); 10651AssertEx.Equal(attributes, test2.GetCustomAttributesToEmit(null).Select(a => a.ToString())); 10753AssertEx.Equal("System.ParamArrayAttribute", test1.GetCustomAttributesToEmit(null).Single().ToString()); 10754AssertEx.Equal("System.Runtime.CompilerServices.ParamCollectionAttribute", test2.GetCustomAttributesToEmit(null).Single().ToString()); 10767AssertEx.Equal("System.ParamArrayAttribute", test1.GetCustomAttributesToEmit(null).Single().ToString()); 10768AssertEx.Equal("System.Runtime.CompilerServices.ParamCollectionAttribute", test2.GetCustomAttributesToEmit(null).Single().ToString());
Semantics\PrimaryConstructorTests.cs (18)
3234Assert.Equal("A", c.PrimaryConstructor.GetAttributes().Single().ToString()); 3390Assert.Equal("A", c.GetAttributes().Single().ToString()); 3411Assert.Equal("A", c.GetAttributes().Single().ToString()); 3455Assert.Equal("A", c1.PrimaryConstructor.GetAttributes().Single().ToString()); 3461Assert.Equal("A", c2.PrimaryConstructor.GetAttributes().Single().ToString()); 3517Assert.Equal("A", c1.PrimaryConstructor.GetAttributes().Single().ToString()); 3523Assert.Equal("B", c2.PrimaryConstructor.GetAttributes().Single().ToString()); 3547Assert.Equal(@"A(""someParam"")", c.PrimaryConstructor.GetAttributes().Single().ToString()); 15728Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attr[0].ToString()); 15729Assert.Equal("System.Diagnostics.DebuggerBrowsableAttribute(System.Diagnostics.DebuggerBrowsableState.Never)", attr[1].ToString()); 15750Assert.Equal("System.Runtime.CompilerServices.NativeIntegerAttribute", attr[0].ToString()); 15771Assert.Equal("System.Runtime.CompilerServices.TupleElementNamesAttribute({\"i1\", \"i2\"})", attr[0].ToString()); 15792Assert.Equal("System.Runtime.CompilerServices.DynamicAttribute", attr[0].ToString()); 22460m.GlobalNamespace.GetMember("Test1.<P1>P").GetAttributes().Select(a => a.ToString())); 22508m.GlobalNamespace.GetMember("Test1.<P1>k__BackingField").GetAttributes().Select(a => a.ToString())); 22544m.GlobalNamespace.GetMember("Test1.<P1>k__BackingField").GetAttributes().Select(a => a.ToString())); 22603m.GlobalNamespace.GetMember("Test1.<P1>P").GetAttributes().Select(a => a.ToString())); 22660m.GlobalNamespace.GetMember("Test1.<P1>P").GetAttributes().Select(a => a.ToString()));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (115)
Semantics\DynamicTests.cs (8)
11731m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>o__0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 11773m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>o__0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 11815m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>o__0|0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 11855m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>o__0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 11912m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>o__1").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 11979m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>o__1").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 12024m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>o__0|1").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 12087m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>o__1").TypeParameters.Single().GetAttributes().Select(a => a.ToString()));
Semantics\InitOnlyMemberTests.cs (4)
1458var propertyAttributes = property.GetAttributes().Select(a => a.ToString()); 1465var getterAttributes = getter.GetAttributes().Select(a => a.ToString()); 1478var setterAttributes = property.SetMethod.GetAttributes().Select(a => a.ToString()); 1493var backingFieldAttributes = backingField.GetAttributes().Select(a => a.ToString());
Semantics\IteratorTests.cs (18)
796m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<M2>d__0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 839m.GlobalNamespace.GetMember("Test1.<M2>d__0.x").GetAttributes().Select(a => a.ToString())); 843m.GlobalNamespace.GetMember("Test1.<M2>d__0.<>3__x").GetAttributes().Select(a => a.ToString())); 904m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 908m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<<Test>g__local|0_0>d").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 956m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|0_0").Parameters.Single().GetAttributes().Select(a => a.ToString())); 960m.GlobalNamespace.GetMember("Test1.<<Test>g__local|0_0>d.x").GetAttributes().Select(a => a.ToString())); 964m.GlobalNamespace.GetMember("Test1.<<Test>g__local|0_0>d.<>3__x").GetAttributes().Select(a => a.ToString())); 1021m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<M2>d__1").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 1086m.GlobalNamespace.GetMember("Test1.<M2>d__1.x").GetAttributes().Select(a => a.ToString())); 1090m.GlobalNamespace.GetMember("Test1.<M2>d__1.<>3__x").GetAttributes().Select(a => a.ToString())); 1179m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 1183m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<<Test>g__local|1_0>d").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 1234m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<Test>g__local|1_0").Parameters.Single().GetAttributes().Select(a => a.ToString())); 1238m.GlobalNamespace.GetMember("Test1.<<Test>g__local|1_0>d.x").GetAttributes().Select(a => a.ToString())); 1242m.GlobalNamespace.GetMember("Test1.<<Test>g__local|1_0>d.<>3__x").GetAttributes().Select(a => a.ToString())); 1292m.GlobalNamespace.GetMember("Test1.<>c__DisplayClass0_0.x").GetAttributes().Select(a => a.ToString())); 1369m.GlobalNamespace.GetMember("Test1.<>c__DisplayClass1_0.x").GetAttributes().Select(a => a.ToString()));
Semantics\LambdaTests.cs (4)
9156m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>c__DisplayClass0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 9197m.GlobalNamespace.GetMember("Test1.<>c__DisplayClass0_0.x").GetAttributes().Select(a => a.ToString())); 9250m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>c__DisplayClass1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 9311m.GlobalNamespace.GetMember("Test1.<>c__DisplayClass1_0.x").GetAttributes().Select(a => a.ToString()));
Semantics\NullableReferenceTypesTests.cs (81)
30173var copenAttributes = copen.GetAttributes().Select(a => a.ToString()); 30184var propertyAttributes = property.GetAttributes().Select(a => a.ToString()); 30195var getterAttributes = getter.GetAttributes().Select(a => a.ToString()); 30205var getterReturnAttributes = getter.GetReturnTypeAttributes().Select(a => a.ToString()); 30224AssertEx.Equal(new[] { "System.Runtime.CompilerServices.CompilerGeneratedAttribute" }, setterAttributes.Select(a => a.ToString())); 30276var copenAttributes = copen.GetAttributes().Select(a => a.ToString()); 30287var propertyAttributes = property.GetAttributes().Select(a => a.ToString()); 30298var getterAttributes = getter.GetAttributes().Select(a => a.ToString()); 30308var getterReturnAttributes = getter.GetReturnTypeAttributes().Select(a => a.ToString()); 30800var fieldAttributes = field.GetAttributes().Select(a => a.ToString()); 40787var fieldAttributes = field.GetAttributes().Select(a => a.ToString()); 40961var copenAttributes = copen.GetAttributes().Select(a => a.ToString()); 40972var propertyAttributes = property.GetAttributes().Select(a => a.ToString()); 40986var setterValueAttributes = setter.Parameters.Last().GetAttributes().Select(a => a.ToString()); 41022var copenAttributes = copen.GetAttributes().Select(a => a.ToString()); 41033var propertyAttributes = property.GetAttributes().Select(a => a.ToString()); 41047var setterValueAttributes = setter.Parameters.Last().GetAttributes().Select(a => a.ToString()); 44642var copenAttributes = copen.GetAttributes().Select(a => a.ToString()); 44653var propertyAttributes = property.GetAttributes().Select(a => a.ToString()); 44664var setterAttributes = setter.GetAttributes().Select(a => a.ToString()); 44674var setterValueAttributes = setter.Parameters.Last().GetAttributes().Select(a => a.ToString()); 44891var fieldAttributes = field.GetAttributes().Select(a => a.ToString()); 47979var copenAttributes = copen.GetAttributes().Select(a => a.ToString()); 47990var propertyAttributes = property.GetAttributes().Select(a => a.ToString()); 48002var getterReturnAttributes = getter.GetReturnTypeAttributes().Select(a => a.ToString()); 48091var fieldAttributes = field.GetAttributes().Select(a => a.ToString()); 97711Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", b.GetAttributes().First().ToString()); 97733Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t2.GetAttributes().Single().ToString()); 97774Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(1)", t1.GetAttributes().Single().ToString()); 97787Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t2.GetAttributes().Single().ToString()); 97881Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t1.GetAttributes().Single().ToString()); 97894Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t2.GetAttributes().Single().ToString()); 98490Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 98504Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", bf2.GetAttributes().Single().ToString()); 98681Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 98695Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", bf2.GetAttributes().Single().ToString()); 98788Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 98802Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", bf2.GetAttributes().Single().ToString()); 98854Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 98869Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", nullableAttribute.ToString()); 98926Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 98942Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", nullableAttribute.ToString()); 98995Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 99009Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", bf2.GetAttributes().Single().ToString()); 99085Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", f2.GetAttributes().Single().ToString()); 99120Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t2.GetAttributes().Single().ToString()); 99369Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 99383Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", bf2.GetAttributes().Single().ToString()); 100363Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", f1.GetAttributes().Single().ToString()); 100401Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", f1.GetAttributes().Single().ToString()); 100736Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", af1.GetAttributes().Single().ToString()); 100750Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(0)", at1.GetAttributes().Single().ToString()); 100766Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 100781Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", attributes[0].ToString()); 100831Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", af1.GetAttributes().Single().ToString()); 100845Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(0)", at1.GetAttributes().Single().ToString()); 102189Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 102258Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 102292Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 102332Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 102370Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", i1.GetAttributes().Single().ToString()); 102492Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 102743Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 102810Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 102843Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 102882Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 102919Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", i1.GetAttributes().Single().ToString()); 103037Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 103137Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 103180Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 103224Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 104882Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(1)", t11.GetAttributes().Single().ToString()); 104895Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(1)", t1.GetAttributes().Single().ToString()); 104909Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t22.GetAttributes().Single().ToString()); 104923Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t2.GetAttributes().Single().ToString()); 104974Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", b.GetAttributes().First().ToString()); 104994Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", nullableAttribute.ToString()); 105051Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", b.GetAttributes().First().ToString()); 105071Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", nullableAttribute.ToString()); 123987Assert.Equal(baseline[i].attribute, f.GetAttributes().Single().ToString()); 124261Assert.Equal(typeParametersBaseline[i].attribute, t.GetAttributes().Single().ToString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (28)
Symbols\DefaultInterfaceImplementationTests.cs (8)
11105Assert.Equal("Test2(1)", m2.GetAttributes()[0].ToString()); 11106Assert.Equal("Test2(2)", m2.GetAttributes()[1].ToString()); 11123Assert.Equal("Test2(1)", m2Impl.GetAttributes()[0].ToString()); 11124Assert.Equal("Test2(2)", m2Impl.GetAttributes()[1].ToString()); 11212Assert.Equal("Test2(1)", m2.GetAttributes()[0].ToString()); 11213Assert.Equal("Test2(2)", m2.GetAttributes()[1].ToString()); 11230Assert.Equal("Test2(1)", m2Impl.GetAttributes()[0].ToString()); 11231Assert.Equal("Test2(2)", m2Impl.GetAttributes()[1].ToString());
Symbols\LocalFunctionTests.cs (12)
560m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>c__DisplayClass0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 591m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<M2>g__local|0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 627m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>c__DisplayClass0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 630m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<M2>g__local|0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 672m.GlobalNamespace.GetMember("Test1.<>c__DisplayClass0_0.x").GetAttributes().Select(a => a.ToString())); 727m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>c__DisplayClass1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 761m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<M2>g__local|1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 816m.GlobalNamespace.GetMember<NamedTypeSymbol>("Test1.<>c__DisplayClass1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 819m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<M2>g__local|1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 882m.GlobalNamespace.GetMember("Test1.<>c__DisplayClass1_0.x").GetAttributes().Select(a => a.ToString())); 919m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<M2>g__local|0_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString())); 959m.GlobalNamespace.GetMember<MethodSymbol>("Test1.<M2>g__local|1_0").TypeParameters.Single().GetAttributes().Select(a => a.ToString()));
Symbols\Metadata\PE\LoadingAttributes.cs (4)
1310Assert.Equal("System.Runtime.CompilerServices.DecimalConstantAttribute(0, 128, 0, 0, 7)", peModule.GetCustomAttributesForToken(field.Handle).Single().ToString()); 1314Assert.Equal("System.Runtime.CompilerServices.DecimalConstantAttribute(0, 128, 0, 0, 7)", peModule.GetCustomAttributesForToken(parameter.Handle).Single().ToString()); 1514Assert.Equal(expected, c.GetTypeByMetadataName("Test").GetAttributes().Single().ToString()); 1518Assert.Equal(expected, m.GlobalNamespace.GetTypeMember("Test").GetAttributes().Single().ToString());
Symbols\Retargeting\RetargetCustomAttributes.cs (2)
351Assert.Equal("A[missing]", a.ToString()); 393Assert.Equal("A", a.ToString());
Symbols\Source\PropertyTests.cs (2)
3062m.GlobalNamespace.GetMember("Test1.<P1>k__BackingField").GetAttributes().Select(a => a.ToString())); 3096m.GlobalNamespace.GetMember("Test1.<P1>k__BackingField").GetAttributes().Select(a => a.ToString()));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
CSharpTestBase.cs (2)
2331return attributes.Select(a => a.ToString()!); 2336return attributes.Select(a => a.ToString()!);
Extensions.cs (1)
420=> attributes.SelectAsArray(a => a.ToString());