434 references to Value
ConfigurationSchemaGenerator (6)
GenerateDocumentationAndConfigFiles (3)
ILLink.RoslynAnalyzer (11)
Metrics (3)
Metrics.Legacy (3)
Microsoft.Analyzers.Extra (3)
Microsoft.AspNetCore.App.Analyzers (5)
Microsoft.AspNetCore.Components.Analyzers (1)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
Microsoft.AspNetCore.Mvc.Analyzers (1)
Microsoft.AspNetCore.Mvc.Api.Analyzers (9)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.Analyzers (10)
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
Microsoft.CodeAnalysis.BannedApiAnalyzers (5)
Microsoft.CodeAnalysis.CodeStyle (5)
Microsoft.CodeAnalysis.CSharp (7)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (11)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (50)
Attributes\AttributeTests.cs (23)
655Assert.Equal(new object[] { 1, 2, 3 }, attributeData.ConstructorArguments.Single().Values.Select(arg => arg.Value));
712Assert.Equal("M0", attrs.Single().ConstructorArguments.Single().Value);
1027Assert.Equal(true, arguments0[0].Value);
1028Assert.Equal(1, arguments0[1].Value);
1034Assert.Equal(true, arguments1[0].Value);
1035Assert.Equal(1, arguments1[1].Value);
1037Assert.Equal("a", arguments1[2].Values.Single().Value);
4649Assert.Equal(33, arg.Value);
4682Assert.Equal(33, arg.Value.Value);
4714Assert.Equal(33, arg.Value);
4747Assert.Equal(33, arg.Value.Value);
4782Assert.Equal(33, arg.Value);
4813Assert.Equal(33, arg.Value);
4839Assert.Equal(33, arg.Value);
4871Assert.Equal(33, arg.Value);
5759Assert.Throws<InvalidOperationException>(() => args[0].Value);
5763Assert.Throws<InvalidOperationException>(() => args[1].Value);
5769Assert.Throws<InvalidOperationException>(() => named["P"].Value);
5773Assert.Throws<InvalidOperationException>(() => named["F"].Value);
5801Assert.Null(args[0].Value);
5805Assert.Null(args[1].Value);
9915var typeInAttribute = (INamedTypeSymbol)type.GetAttributes()[0].ConstructorArguments.First().Value;
9925typeInAttribute = (INamedTypeSymbol)type.GetAttributes()[0].ConstructorArguments.First().Value;
Attributes\AttributeTests_CallerInfoAttributes.cs (14)
1946Assert.Equal("Hello", attributeArguments[0].Value);
1947Assert.Equal("\"Hello\"", attributeArguments[1].Value);
1978Assert.Equal("Hello", attributeArguments[0].Value);
1979Assert.Equal("\"Hello\"", attributeArguments[1].Value);
2010Assert.Equal("Hello", attributeArguments[0].Value);
2011Assert.Equal("World", attributeArguments[1].Value);
2012Assert.Equal("\"Hello\"", attributeArguments[2].Value);
2043Assert.Equal("Hello", attributeArguments[0].Value);
2044Assert.Equal("World", attributeArguments[1].Value);
2045Assert.Equal("\"Hello\"", attributeArguments[2].Value);
2301Assert.Equal(3, arguments[0].Value);
2302Assert.Equal(0, arguments[1].Value);
4410Assert.Equal(1, attr.CommonConstructorArguments[0].Value);
4440Assert.Equal(1, attr.CommonConstructorArguments[0].Value);
Microsoft.CodeAnalysis.CSharp.Features (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (37)
Symbols\Metadata\PE\LoadingAttributes.cs (27)
389Assert.Equal("Integer", attr.CommonConstructorArguments.Single().Value);
395Assert.Equal("Integer", attr.CommonConstructorArguments.Single().Value);
551CheckConstructorArg(expected[i].Pos[j], pa.Value.ToString());
573Assert.Equal(expected.Value, actual.Value.Value.ToString());
627Assert.Equal(2, a.CommonConstructorArguments[0].Value);
701Assert.Equal(typeof(Int32), attrSym.CommonConstructorArguments[0].Value.GetType());
702Assert.Equal(1, attrSym.CommonConstructorArguments[0].Value);
719Assert.Equal(32, attrSym.CommonConstructorArguments[0].Value);
752Assert.Equal(3, attrSym.CommonConstructorArguments[0].Value);
756Assert.Equal(true, attrSym.CommonNamedArguments[0].Value.Value);
989Assert.Equal("555", attrSym.CommonConstructorArguments[0].Value);
997Assert.Equal("obj", attrSym.CommonConstructorArguments[0].Value);
998Assert.Equal(12, attrSym.CommonConstructorArguments[1].Value);
1008Assert.Equal("System.Collections.Generic.IList<>", (attrSym.CommonNamedArguments[0].Value.Value as INamedTypeSymbol).ToString());
1119Assert.Equal(-1, prop.GetAttributes().First().CommonConstructorArguments[0].Value);
1137Assert.Equal(-8, attrSym.CommonConstructorArguments[0].Value);
1139Assert.Equal(Convert.ToByte(255), attrSym.CommonConstructorArguments[1].Value);
1149Assert.Equal(7, attrSym.CommonConstructorArguments[0].Value);
1151Assert.Equal(256L, attrSym.CommonConstructorArguments[1].Value);
1153Assert.Equal(0.123f, attrSym.CommonConstructorArguments[2].Value);
1154Assert.Equal(Convert.ToInt16(-2), attrSym.CommonConstructorArguments[3].Value);
1162Assert.Equal("AttributeUse.IFoo<System.Int16, System.UInt16>", (attrSym.CommonConstructorArguments[0].Value as INamedTypeSymbol).ToDisplayString(SymbolDisplayFormat.TestFormat));
1163Assert.Equal(1, attrSym.CommonNamedArguments[0].Value.Value);
1211Assert.Equal("System.Linq.Expressions.Expression.BinaryExpressionProxy", ((ITypeSymbol)attr1.CommonConstructorArguments[0].Value).ToDisplayString(SymbolDisplayFormat.TestFormat));
1216Assert.Equal("System.Linq.Expressions.Expression.TypeBinaryExpressionProxy", ((ITypeSymbol)attr1.CommonConstructorArguments[0].Value).ToDisplayString(SymbolDisplayFormat.TestFormat));
1246Assert.Equal(0, attr.CommonNamedArguments[0].Value.Value);
1283Assert.Equal(1, attr.CommonConstructorArguments[0].Value);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Microsoft.CodeAnalysis.Features (10)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (6)
Microsoft.CodeAnalysis.PublicApiAnalyzers (5)
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (3)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (4)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (4)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
Microsoft.CodeAnalysis.Workspaces (5)
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.Options.SourceGeneration (7)
Microsoft.Extensions.Validation.ValidationsGenerator (3)
Microsoft.Gen.ComplianceReports (1)
Microsoft.Gen.Logging (9)
Microsoft.Gen.MetadataExtractor (8)
Microsoft.Gen.Metrics (7)
Microsoft.Gen.MetricsReports (7)
Microsoft.Interop.ComInterfaceGenerator (17)
Microsoft.Interop.JavaScript.JSImportGenerator (3)
Microsoft.Interop.LibraryImportGenerator (10)
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
Microsoft.Interop.SourceGeneration (21)
Microsoft.Maui.Controls.BindingSourceGen (1)
Microsoft.Maui.Controls.SourceGen (4)
Microsoft.ML.InternalCodeAnalyzer (1)
Mvc.Analyzers.Test (15)
CodeAnalysisExtensionsTest.cs (15)
63attributeData => Assert.Equal(201, attributeData.ConstructorArguments[0].Value));
100attributeData => Assert.Equal(400, attributeData.ConstructorArguments[0].Value));
137attributeData => Assert.Equal(400, attributeData.ConstructorArguments[0].Value));
174attributeData => Assert.Equal(400, attributeData.ConstructorArguments[0].Value),
175attributeData => Assert.Equal(200, attributeData.ConstructorArguments[0].Value),
176attributeData => Assert.Equal(404, attributeData.ConstructorArguments[0].Value));
219attributeData => Assert.Equal(400, attributeData.ConstructorArguments[0].Value));
262attributeData => Assert.Equal(401, attributeData.ConstructorArguments[0].Value));
318Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_Object));
323Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_String));
361Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_Int32));
366Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_Object));
371Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_String));
409Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_Int32));
447Assert.Equal(attributeData.ConstructorArguments[0].Value, compilation.GetSpecialType(SpecialType.System_Int32));
Roslyn.Diagnostics.Analyzers (5)
Roslyn.Diagnostics.CSharp.Analyzers (3)
Roslyn.Diagnostics.VisualBasic.Analyzers (3)
System.Private.CoreLib.Generators (3)
System.Text.Json.SourceGeneration (42)
System.Text.RegularExpressions.Generator (6)
Test.Utilities (3)
Text.Analyzers (3)