260 references to Value
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.DetectInvalidModelNames.cs (1)
24var modelName = token.Value?.ToString();
Microsoft.AspNetCore.App.Analyzers (1)
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (1)
284.Where(node => string.Equals(node.Identifier.Value as string, operation.TargetMethod.Name, StringComparison.Ordinal))
Microsoft.CodeAnalysis.CSharp (3)
Syntax\CSharpLineDirectiveMap.cs (3)
70object? value = lineToken.Value; 112token.Value is int tokenValue) 132value = (string?)token.Value;
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
874Name.Identifier.Value: CreateName or CreateRangeName,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
147lineDirective.Line.Value is int) 149info = new ExternalSourceInfo((int)lineDirective.Line.Value, false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1726var name = memberAccessExpression.Name.Identifier.Value;
Microsoft.CodeAnalysis.CSharp.Features (5)
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
105if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.AllowsKeyword &&
Completion\KeywordRecommenders\UsingKeywordRecommender.cs (2)
146else if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.GlobalKeyword) 158else if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.GlobalKeyword)
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
197=> expression.WalkDownParentheses() is LiteralExpressionSyntax literal && literal.Token.Value is 1;
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
874Name.Identifier.Value: CreateName or CreateRangeName,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\SyntaxAwareGeneratorTests.cs (1)
787&& cds.Identifier.Value?.ToString() == "C")
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (151)
LexicalAndXml\LexicalTests.cs (107)
1745Assert.Equal(value, token.Value); 1761Assert.Equal(value, token.Value); 1777Assert.Equal(value, token.Value); 1793Assert.Equal(value, token.Value); 1809Assert.Equal(value, token.Value); 1996Assert.Equal(value, token.Value); 2012Assert.Equal(value, token.Value); 2028Assert.Equal(value, token.Value); 2044Assert.Equal(value, token.Value); 2060Assert.Equal(value, token.Value); 2076Assert.Equal(value, token.Value); 2092Assert.Equal(value, token.Value); 2108Assert.Equal(value, token.Value); 2124Assert.Equal(value, token.Value); 2140Assert.Equal(value, token.Value); 2156Assert.Equal(value, token.Value); 2172Assert.Equal(value, token.Value); 2188Assert.Equal(value, token.Value); 2204Assert.Equal(value, token.Value); 2220Assert.Equal(value, token.Value); 2236Assert.Equal(value, token.Value); 2252Assert.Equal(value, token.Value); 2268Assert.Equal(value, token.Value); 2278Assert.Equal(value, token.Value); 2294Assert.Equal(value, token.Value); 2304Assert.Equal(value, token.Value); 2320Assert.Equal(value, token.Value); 2330Assert.Equal(value, token.Value); 2346Assert.Equal(value, token.Value); 2356Assert.Equal(value, token.Value); 2372Assert.Equal(value, token.Value); 2382Assert.Equal(value, token.Value); 2398Assert.Equal(value, token.Value); 2407Assert.Equal(value, token.Value); 2423Assert.Equal(value, token.Value); 2433Assert.Equal(value, token.Value); 2449Assert.Equal(value, token.Value); 2459Assert.Equal(value, token.Value); 2489Assert.Equal(value, token.Value); 2499Assert.Equal(value, token.Value); 2515Assert.Equal(value, token.Value); 2524Assert.Equal(value, token.Value); 2540Assert.Equal(value, token.Value); 2550Assert.Equal(value, token.Value); 2566Assert.Equal(value, token.Value); 2576Assert.Equal(value, token.Value); 2591Assert.Equal(Int32.MaxValue, token.Value); 2606Assert.Equal(UInt32.MaxValue, token.Value); 2622Assert.Equal(value, token.Value); 2638Assert.Equal(value, token.Value); 2654Assert.Equal(value, token.Value); 2684Assert.Equal(Int64.MaxValue, token.Value); 2699Assert.Equal((ulong)Int64.MaxValue + 1, token.Value); 2714Assert.Equal(UInt64.MaxValue, token.Value); 2745Assert.Equal(value, token.Value); 2761Assert.Equal(value, token.Value); 2777Assert.Equal(value, token.Value); 2793Assert.Equal(value, token.Value); 2809Assert.Equal(value, token.Value); 2825Assert.Equal(value, token.Value); 2841Assert.Equal(value, token.Value); 2857Assert.Equal(value, token.Value); 2873Assert.Equal(value, token.Value); 2889Assert.Equal(value, token.Value); 2905Assert.Equal(value, token.Value); 2921Assert.Equal(value, token.Value); 2937Assert.Equal(value, token.Value); 2953Assert.Equal(value, token.Value); 2969Assert.Equal(value, token.Value); 2985Assert.Equal(value, token.Value); 3001Assert.Equal(value, token.Value); 3017Assert.Equal(value, token.Value); 3062Assert.Equal(1000, token.Value); 3071Assert.Equal(1000, token.Value); 3080Assert.Equal(1000.0001, token.Value); 3089Assert.Equal(1010.0101f, token.Value); 3098Assert.Equal(1010.0101e01, token.Value); 3107Assert.Equal(0xAA, token.Value); 3116Assert.Equal(3, token.Value); 3144Assert.Equal(0xA, token.Value); 3153Assert.Equal(1, token.Value); 3162Assert.Equal(0xA1L, token.Value); 3171Assert.Equal(0b11L, token.Value); 3390Assert.Equal(value, token.Value); 3406Assert.Equal(value, token.Value); 3422Assert.Equal(value, token.Value); 3438Assert.Equal(value, token.Value); 3459Assert.Equal(text, token.Value); 3469Assert.Equal(text, token.Value); 3479Assert.Equal(text.Substring(0, text.Length - 1), token.Value); 3489Assert.Equal("@", token.Value); 3495Assert.Equal("0x0", token.Value); 3501Assert.Equal("0X012345678", token.Value); 3507Assert.Equal("0x9abcdefA", token.Value); 3513Assert.Equal("0xBCDEF", token.Value); 3519Assert.Equal("@", token.Value); 3525Assert.Equal("@", token.Value); 3531Assert.Equal("@", token.Value); 3537Assert.Equal("@", token.Value); 3543Assert.Equal("0xffff0000ffff0000ffff0000", token.Value); 3563Assert.Equal(text, token.Value); 3573Assert.Equal(text, token.Value); 3583Assert.Equal(0x123, token.Value); 3593Assert.Equal(123L, token.Value); 3604Assert.Equal("$123", token.Value); 3654Assert.Equal("token", token.Value); 3786Assert.Equal(expectedBits, ToHexString((decimal)token.Value));
LexicalAndXml\PreprocessorTests.cs (5)
241Assert.Equal(exp.Number, ld.Line.Value); // Number 252Assert.Equal(exp.Text, ld.File.Value); 367Assert.Equal(expected.FileGuidByte[0], pcd.File.Value); 373Assert.Equal(expected.FileGuidByte[1], pcd.Guid.Value); 379Assert.Equal(expected.FileGuidByte[2], pcd.Bytes.Value);
LexicalAndXml\RawStringLiteralLexingTests.cs (2)
194Assert.NotNull(token.Value); 195Assert.IsType<string>(token.Value);
LexicalAndXml\XmlDocCommentTests.cs (31)
1321Assert.Equal(" ", xmltext.TextTokens[0].Value); 1322Assert.Equal("<", xmltext.TextTokens[1].Value); 1345Assert.Equal(" ", xmltext.TextTokens[0].Value); 1346Assert.Equal("<", xmltext.TextTokens[1].Value); 1347Assert.Equal(" ", xmltext.TextTokens[2].Value); 1370Assert.Equal(" ", xmltext.TextTokens[0].Value); 1371Assert.Equal("A", xmltext.TextTokens[1].Value); 1394Assert.Equal(" ", xmltext.TextTokens[0].Value); 1395Assert.Equal("A", xmltext.TextTokens[1].Value); 1396Assert.Equal(" ", xmltext.TextTokens[2].Value); 1419Assert.Equal(" ", xmltext.TextTokens[0].Value); 1420Assert.Equal("A", xmltext.TextTokens[1].Value); 1443Assert.Equal(" ", xmltext.TextTokens[0].Value); 1444Assert.Equal("A", xmltext.TextTokens[1].Value); 1445Assert.Equal(" ", xmltext.TextTokens[2].Value); 1468Assert.Equal(" ", xmltext.TextTokens[0].Value); 1469Assert.Equal("\U0001D11E", xmltext.TextTokens[1].Value); 1492Assert.Equal(" ", xmltext.TextTokens[0].Value); 1493Assert.Equal("\U0001D11E", xmltext.TextTokens[1].Value); 1494Assert.Equal(" ", xmltext.TextTokens[2].Value); 1575Assert.Equal(" ", attribute.TextTokens[0].Value); 1576Assert.Equal("<", attribute.TextTokens[1].Value); 1577Assert.Equal(" ", attribute.TextTokens[2].Value); 1603Assert.Equal(" ", attribute.TextTokens[0].Value); 1604Assert.Equal("<", attribute.TextTokens[1].Value); 1605Assert.Equal(" ", attribute.TextTokens[2].Value); 3343Assert.Equal(tagName, xmlElement.StartTag.Name.LocalName.Value); 3344Assert.Equal(tagName, xmlElement.EndTag.Name.LocalName.Value); 3384Assert.Equal(tagName, xmlElement.Name.LocalName.Value); 3399Assert.True(attributes.ContainsKey(attribute.Name.LocalName.Value as string)); 3402Assert.Equal(attributes[attribute.Name.LocalName.Value as string], attribute.TextTokens.ToString());
Syntax\StructuredTriviaTests.cs (6)
111Assert.Equal("ref0", directives[0].File.Value); 112Assert.Equal("ref1", directives[1].File.Value); 113Assert.Equal("ref2", directives[2].File.Value); 125Assert.Equal("ref0", directives[0].File.Value); 151Assert.Equal("", directives[1].File.Value); 152Assert.Equal("a", directives[2].File.Value);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
147lineDirective.Line.Value is int) 149info = new ExternalSourceInfo((int)lineDirective.Line.Value, false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1726var name = memberAccessExpression.Name.Identifier.Value;
Microsoft.CodeAnalysis.Features (1)
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
155var value = piece.GetFirstToken().Value?.ToString() ?? piece.GetFirstToken().ValueText;
Microsoft.CodeAnalysis.VisualBasic (2)
Syntax\VisualBasicLineDirectiveMap.vb (2)
53mappedLine = CInt(Math.Min(CLng(extSourceDirective.LineStart.Value), Integer.MaxValue) - 1) 55mappedPathOpt = CStr(extSourceDirective.ExternalSource.Value)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
142info = New ExternalSourceInfo(CInt(DirectCast(node, ExternalSourceDirectiveTriviaSyntax).LineStart.Value), False)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
908Dim name = memberAccessExpression.Name.Identifier.Value
Microsoft.CodeAnalysis.VisualBasic.Features (3)
ConvertForToForEach\VisualBasicConvertForToForEachCodeRefactoringProvider.vb (2)
63If TypeOf subtractionRight?.Token.Value Is Integer AndAlso 64DirectCast(subtractionRight.Token.Value, Integer) = 1 Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
124Where String.Equals(DirectCast(identifier.Identifier.Value, String), localOrParameter.Name, StringComparison.OrdinalIgnoreCase) AndAlso
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (69)
Scanner\ScannerTests.vb (69)
1270Dim val = DirectCast(tk.Value, Char) 1318Dim str = DirectCast(tk.Value, String) 1367Assert.Equal(42, tk.Value) 1373Assert.Equal(42, tk.Value) 1380Assert.Equal(42, tk.Value) 1388Assert.Equal(&H42L, tk.Value) 1395Assert.Equal(&H42L, tk.Value) 1402Assert.Equal(&H1, tk.Value) 1409Assert.Equal(&B1, tk.Value) 1416Assert.Equal(&O1, tk.Value) 1423Assert.Equal(&H11L, tk.Value) 1430Assert.Equal(&B11L, tk.Value) 1437Assert.Equal(&O11L, tk.Value) 1451Assert.Equal(&HAL, tk.Value) 1458Assert.Equal(&HAL, tk.Value) 1468Assert.Equal(4.2, tk.Value) 1473Assert.Equal(0.42, tk.Value) 1474Assert.IsType(Of Double)(tk.Value) 1480Assert.Equal(0.42, tk.Value) 1481Assert.IsType(Of Double)(tk.Value) 1487Assert.Equal(0.42, tk.Value) 1488Assert.IsType(Of Double)(tk.Value) 1494Assert.Equal(0.42, tk.Value) 1495Assert.IsType(Of Double)(tk.Value) 1501Assert.Equal(0.42!, tk.Value) 1502Assert.IsType(Of Single)(tk.Value) 1508Assert.Equal(0.42F, tk.Value) 1509Assert.IsType(Of Single)(tk.Value) 1527Assert.Equal(4.2D, tk.Value) 1532Assert.Equal(0.42@, tk.Value) 1550Assert.Equal(10D, tk.Value) 1559Assert.Equal(2147483647I, CInt(tk.Value)) 1565Assert.Equal(0, CInt(tk.Value)) 1570Assert.Equal(&H7FFFFFFFI, CInt(tk.Value)) 1575Assert.Equal(&HFFFFFFFFI, tk.Value) 1581Assert.Equal(0, CInt(tk.Value)) 1587Assert.Equal(0, CInt(tk.Value)) 1592Assert.Equal(&HFFFFFFFFUI, CUInt(tk.Value)) 1597Assert.Equal(&H7FFFFFFFI, CInt(tk.Value)) 1603Assert.Equal(0D, tk.Value) 1609Assert.Equal(0.0F, tk.Value) 1623Assert.Equal(0, CInt(tk.Value)) 1629Assert.Equal(0, CInt(tk.Value)) 1635Assert.Equal(0, CInt(tk.Value)) 1641Assert.Equal(0, CInt(tk.Value)) 1649Assert.Equal(0, CInt(tk.Value)) 1657Assert.Equal(0, CInt(tk.Value)) 1668Assert.Equal(1, CInt(tk.Value)) 1677Assert.Equal(0, CInt(tk.Value)) 1685Assert.Equal(#10/10/2010#, tk.Value) 1690Assert.Equal(#10/10/0001#, tk.Value) 1695Assert.Equal(#10/10/0101#, tk.Value) 1706Assert.Equal(#10/10/2010 10:10:00 PM#, tk.Value) 1719Assert.Equal(#10/12/1984#, token.Value) 1725Assert.Equal(#10/12/1984#, token.Value) 1742Assert.Equal(#4/12/2010#, token.Value) 1748Assert.Equal(#11/5/1955#, token.Value) 1754Assert.Equal(#1/1/1 9:45:01 AM#, token.Value) 1760Assert.Equal(#4/12/2010 9:00:00 AM#, token.Value) 1765Assert.Equal(#4/12/2010 9:00:00 AM#, token.Value) 1812Assert.Equal(4.2, tk.Value) 1817Assert.Equal(4.2F, tk.Value) 1818Assert.IsType(Of Single)(tk.Value) 1823Assert.Equal(4.2R, tk.Value) 1824Assert.IsType(Of Double)(tk.Value) 1829Assert.Equal(4.2D, tk.Value) 1830Assert.IsType(Of Decimal)(tk.Value) 1835Assert.Equal(#8/23/1970 3:35:39 AM#, tk.Value) 1848Assert.Equal("Goo123", tk.Value)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
CodeCleanup\Providers\ReduceTokensCodeCleanupProvider.vb (5)
72Dim value = DirectCast(literal.Value, Decimal) 91Dim value As ULong = CType(literal.Value, ULong) 105Dim valueText As String = GetIntegerLiteralValueString(literal.Value, base.Value) + GetTypeCharString(literal.GetTypeCharacter()) 239Dim singleValue = DirectCast(literal.Value, Single) 243value = DirectCast(literal.Value, Double)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
142info = New ExternalSourceInfo(CInt(DirectCast(node, ExternalSourceDirectiveTriviaSyntax).LineStart.Value), False)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
908Dim name = memberAccessExpression.Name.Identifier.Value
Microsoft.CodeAnalysis.Workspaces (6)
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (1)
191if (_value.Equals(token.Value))
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (5)
150longLiterals.Add((char)token.Value!); 155var value = token.Value; 168longLiterals.Add(IntegerUtilities.ToInt64(token.Value)); 278if (numericToken.Value is not int version) 282if (dataToken.Value is not string data)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
511string? entryPoint = (string?)((LiteralExpressionSyntax)attrArg.Expression).Token.Value;