279 references to Value
Microsoft.CodeAnalysis.CSharp (13)
Binder\Binder_Expressions.cs (2)
6238var value = node.Token.Value; 6285var value = (string)node.Token.Value;
Binder\Binder_Operators.cs (4)
3048if (token.Value is uint) 3050uint value = (uint)token.Value; 3063else if (token.Value is ulong) 3065var value = (ulong)token.Value;
CommandLine\CSharpCompiler.cs (1)
352var path = (string?)directive.File.Value;
Compilation\SyntaxAndDeclarationManager.cs (1)
186var path = (string)fileToken.Value;
Syntax\CSharpLineDirectiveMap.cs (4)
70object? value = lineToken.Value; 79mappedPathOpt = (string?)directive.File.Value; 112token.Value is int tokenValue) 126value = (string?)token.Value;
Syntax\CSharpPragmaWarningStateMap.cs (1)
128errorId = MessageProvider.Instance.GetIdForErrorCode((int)token.Value!);
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
CSharpSyntaxFacts.cs (2)
144lineDirective.Line.Value is int) 146info = new ExternalSourceInfo((int)lineDirective.Line.Value, false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
CSharpTypeInferenceService.TypeInferrer.cs (1)
1763var name = memberAccessExpression.Name.Identifier.Value;
Microsoft.CodeAnalysis.CSharp.Features (4)
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)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
209where (string?)nameSyntax.Identifier.Value == localOrParameter.Name &&
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
195=> expression.WalkDownParentheses() is LiteralExpressionSyntax literal && literal.Token.Value is 1;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\SyntaxAwareGeneratorTests.cs (1)
796&& cds.Identifier.Value?.ToString() == "C")
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (151)
LexicalAndXml\LexicalTests.cs (107)
1330Assert.Equal(value, token.Value); 1346Assert.Equal(value, token.Value); 1362Assert.Equal(value, token.Value); 1378Assert.Equal(value, token.Value); 1394Assert.Equal(value, token.Value); 1581Assert.Equal(value, token.Value); 1597Assert.Equal(value, token.Value); 1613Assert.Equal(value, token.Value); 1629Assert.Equal(value, token.Value); 1645Assert.Equal(value, token.Value); 1661Assert.Equal(value, token.Value); 1677Assert.Equal(value, token.Value); 1693Assert.Equal(value, token.Value); 1709Assert.Equal(value, token.Value); 1725Assert.Equal(value, token.Value); 1741Assert.Equal(value, token.Value); 1757Assert.Equal(value, token.Value); 1773Assert.Equal(value, token.Value); 1789Assert.Equal(value, token.Value); 1805Assert.Equal(value, token.Value); 1821Assert.Equal(value, token.Value); 1837Assert.Equal(value, token.Value); 1853Assert.Equal(value, token.Value); 1863Assert.Equal(value, token.Value); 1879Assert.Equal(value, token.Value); 1889Assert.Equal(value, token.Value); 1905Assert.Equal(value, token.Value); 1915Assert.Equal(value, token.Value); 1931Assert.Equal(value, token.Value); 1941Assert.Equal(value, token.Value); 1957Assert.Equal(value, token.Value); 1967Assert.Equal(value, token.Value); 1983Assert.Equal(value, token.Value); 1992Assert.Equal(value, token.Value); 2008Assert.Equal(value, token.Value); 2018Assert.Equal(value, token.Value); 2034Assert.Equal(value, token.Value); 2044Assert.Equal(value, token.Value); 2074Assert.Equal(value, token.Value); 2084Assert.Equal(value, token.Value); 2100Assert.Equal(value, token.Value); 2109Assert.Equal(value, token.Value); 2125Assert.Equal(value, token.Value); 2135Assert.Equal(value, token.Value); 2151Assert.Equal(value, token.Value); 2161Assert.Equal(value, token.Value); 2176Assert.Equal(Int32.MaxValue, token.Value); 2191Assert.Equal(UInt32.MaxValue, token.Value); 2207Assert.Equal(value, token.Value); 2223Assert.Equal(value, token.Value); 2239Assert.Equal(value, token.Value); 2269Assert.Equal(Int64.MaxValue, token.Value); 2284Assert.Equal((ulong)Int64.MaxValue + 1, token.Value); 2299Assert.Equal(UInt64.MaxValue, token.Value); 2330Assert.Equal(value, token.Value); 2346Assert.Equal(value, token.Value); 2362Assert.Equal(value, token.Value); 2378Assert.Equal(value, token.Value); 2394Assert.Equal(value, token.Value); 2410Assert.Equal(value, token.Value); 2426Assert.Equal(value, token.Value); 2442Assert.Equal(value, token.Value); 2458Assert.Equal(value, token.Value); 2474Assert.Equal(value, token.Value); 2490Assert.Equal(value, token.Value); 2506Assert.Equal(value, token.Value); 2522Assert.Equal(value, token.Value); 2538Assert.Equal(value, token.Value); 2554Assert.Equal(value, token.Value); 2570Assert.Equal(value, token.Value); 2586Assert.Equal(value, token.Value); 2602Assert.Equal(value, token.Value); 2647Assert.Equal(1000, token.Value); 2656Assert.Equal(1000, token.Value); 2665Assert.Equal(1000.0001, token.Value); 2674Assert.Equal(1010.0101f, token.Value); 2683Assert.Equal(1010.0101e01, token.Value); 2692Assert.Equal(0xAA, token.Value); 2701Assert.Equal(3, token.Value); 2729Assert.Equal(0xA, token.Value); 2738Assert.Equal(1, token.Value); 2747Assert.Equal(0xA1L, token.Value); 2756Assert.Equal(0b11L, token.Value); 2975Assert.Equal(value, token.Value); 2991Assert.Equal(value, token.Value); 3007Assert.Equal(value, token.Value); 3023Assert.Equal(value, token.Value); 3044Assert.Equal(text, token.Value); 3054Assert.Equal(text, token.Value); 3064Assert.Equal(text.Substring(0, text.Length - 1), token.Value); 3074Assert.Equal("@", token.Value); 3080Assert.Equal("0x0", token.Value); 3086Assert.Equal("0X012345678", token.Value); 3092Assert.Equal("0x9abcdefA", token.Value); 3098Assert.Equal("0xBCDEF", token.Value); 3104Assert.Equal("@", token.Value); 3110Assert.Equal("@", token.Value); 3116Assert.Equal("@", token.Value); 3122Assert.Equal("@", token.Value); 3128Assert.Equal("0xffff0000ffff0000ffff0000", token.Value); 3148Assert.Equal(text, token.Value); 3158Assert.Equal(text, token.Value); 3168Assert.Equal(0x123, token.Value); 3178Assert.Equal(123L, token.Value); 3189Assert.Equal("$123", token.Value); 3239Assert.Equal("token", token.Value); 3371Assert.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)
1320Assert.Equal(" ", xmltext.TextTokens[0].Value); 1321Assert.Equal("<", xmltext.TextTokens[1].Value); 1344Assert.Equal(" ", xmltext.TextTokens[0].Value); 1345Assert.Equal("<", xmltext.TextTokens[1].Value); 1346Assert.Equal(" ", xmltext.TextTokens[2].Value); 1369Assert.Equal(" ", xmltext.TextTokens[0].Value); 1370Assert.Equal("A", xmltext.TextTokens[1].Value); 1393Assert.Equal(" ", xmltext.TextTokens[0].Value); 1394Assert.Equal("A", xmltext.TextTokens[1].Value); 1395Assert.Equal(" ", xmltext.TextTokens[2].Value); 1418Assert.Equal(" ", xmltext.TextTokens[0].Value); 1419Assert.Equal("A", xmltext.TextTokens[1].Value); 1442Assert.Equal(" ", xmltext.TextTokens[0].Value); 1443Assert.Equal("A", xmltext.TextTokens[1].Value); 1444Assert.Equal(" ", xmltext.TextTokens[2].Value); 1467Assert.Equal(" ", xmltext.TextTokens[0].Value); 1468Assert.Equal("\U0001D11E", xmltext.TextTokens[1].Value); 1491Assert.Equal(" ", xmltext.TextTokens[0].Value); 1492Assert.Equal("\U0001D11E", xmltext.TextTokens[1].Value); 1493Assert.Equal(" ", xmltext.TextTokens[2].Value); 1574Assert.Equal(" ", attribute.TextTokens[0].Value); 1575Assert.Equal("<", attribute.TextTokens[1].Value); 1576Assert.Equal(" ", attribute.TextTokens[2].Value); 1602Assert.Equal(" ", attribute.TextTokens[0].Value); 1603Assert.Equal("<", attribute.TextTokens[1].Value); 1604Assert.Equal(" ", attribute.TextTokens[2].Value); 3329Assert.Equal(tagName, xmlElement.StartTag.Name.LocalName.Value); 3330Assert.Equal(tagName, xmlElement.EndTag.Name.LocalName.Value); 3370Assert.Equal(tagName, xmlElement.Name.LocalName.Value); 3385Assert.True(attributes.ContainsKey(attribute.Name.LocalName.Value as string)); 3388Assert.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)
CSharpSyntaxFacts.cs (2)
144lineDirective.Line.Value is int) 146info = new ExternalSourceInfo((int)lineDirective.Line.Value, false);
CSharpTypeInferenceService.TypeInferrer.cs (1)
1763var name = memberAccessExpression.Name.Identifier.Value;
Microsoft.CodeAnalysis.Features (2)
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
141var value = piece.GetFirstToken().Value?.ToString() ?? piece.GetFirstToken().ValueText;
FindUsages\AbstractFindUsagesService_FindReferences.cs (1)
196var tokenValue = token.Value;
Microsoft.CodeAnalysis.VisualBasic (4)
Binding\Binder_Expressions.vb (1)
4423Dim value = node.Token.Value
CommandLine\VisualBasicCompiler.vb (1)
279Dim path = CStr(directive.ExternalSource.Value)
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)
VisualBasicSyntaxFacts.vb (1)
146info = New ExternalSourceInfo(CInt(DirectCast(node, ExternalSourceDirectiveTriviaSyntax).LineStart.Value), False)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
VisualBasicTypeInferenceService.TypeInferrer.vb (1)
909Dim name = memberAccessExpression.Name.Identifier.Value
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Completion\KeywordRecommenders\Expressions\BinaryOperatorKeywordRecommender.vb (1)
123If token.Kind = SyntaxKind.IntegerLiteralToken AndAlso CInt(token.Value) = 0 Then
ConvertForToForEach\VisualBasicConvertForToForEachCodeRefactoringProvider.vb (2)
63If TypeOf subtractionRight?.Token.Value Is Integer AndAlso 64DirectCast(subtractionRight.Token.Value, Integer) = 1 Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (1)
273Where String.Equals(DirectCast(identifier.Identifier.Value, String), localOrParameter.Name, StringComparison.OrdinalIgnoreCase) AndAlso
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Semantics\UserDefinedBinaryOperators.vb (1)
2784Assert.Equal("=", equalsSyntax.EqualsToken.Value)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (80)
Parser\ParseDirectives.vb (1)
2691Assert.Equal("someOtherId", enableNode.ErrorCodes(0).Identifier.Value)
Scanner\ScannerTests.vb (79)
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) 1444Assert.Equal(&H42L, tks(1).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) 1515Assert.Equal(42.0#, tks(1).Value) 1516Assert.Equal(0.42, tks(0).Value) 1517Assert.IsType(Of Double)(tks(1).Value) 1527Assert.Equal(4.2D, tk.Value) 1532Assert.Equal(0.42@, tk.Value) 1538Assert.Equal(4242424242424242424242424242D, tks(1).Value) 1539Assert.Equal(0.42D, tks(0).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) 1710Assert.Equal(#10/10/2010#, tks(2).Value) 1711Assert.Equal(#10/10/2010 10:10:00 PM#, tks(3).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) 1769Assert.Equal(#4/12/2010#, tokens(2).Value) 1770Assert.Equal(#4/12/2010 9:00:00 AM#, tokens(3).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)
VisualBasicSyntaxFacts.vb (1)
146info = New ExternalSourceInfo(CInt(DirectCast(node, ExternalSourceDirectiveTriviaSyntax).LineStart.Value), False)
VisualBasicTypeInferenceService.TypeInferrer.vb (1)
909Dim name = memberAccessExpression.Name.Identifier.Value
Microsoft.CodeAnalysis.Workspaces (4)
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (1)
190if (_value.Equals(token.Value))
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (3)
141longLiterals.Add((char)token.Value!); 146var value = token.Value; 159longLiterals.Add(IntegerUtilities.ToInt64(token.Value));