76 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 (13)
Binder\Binder_Expressions.cs (2)
7544var value = node.Token.Value; 7591var value = (string)node.Token.Value;
Binder\Binder_Operators.cs (4)
4719if (token.Value is uint) 4721uint value = (uint)token.Value; 4734else if (token.Value is ulong) 4736var value = (ulong)token.Value;
CommandLine\CSharpCompiler.cs (1)
353var path = (string?)directive.File.Value;
Compilation\SyntaxAndDeclarationManager.cs (1)
207var path = (string)fileToken.Value;
Syntax\CSharpLineDirectiveMap.cs (4)
70object? value = lineToken.Value; 79mappedPathOpt = (string?)directive.File.Value; 112token.Value is int tokenValue) 132value = (string?)token.Value;
Syntax\CSharpPragmaWarningStateMap.cs (1)
128errorId = MessageProvider.Instance.GetIdForErrorCode((int)token.Value!);
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
887Name.Identifier.Value: CreateName or CreateRangeName,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
155lineDirective.Line.Value is int) 157info = new ExternalSourceInfo((int)lineDirective.Line.Value, false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1804var name = memberAccessExpression.Name.Identifier.Value;
Microsoft.CodeAnalysis.CSharp.Features (7)
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
147if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.AllowsKeyword &&
Completion\KeywordRecommenders\UsingKeywordRecommender.cs (2)
141else if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.GlobalKeyword) 153else if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.GlobalKeyword)
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (2)
202if (token.Value is not char) 208if (token.Value is not char character)
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
196=> expression.WalkDownParentheses() is LiteralExpressionSyntax literal && literal.Token.Value is 1;
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
887Name.Identifier.Value: CreateName or CreateRangeName,
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (9)
Microsoft.NetCore.Analyzers\Performance\CSharpUseSearchValues.cs (4)
156characterLiteral.Token.Value is char charValue) 173literal.Token.Value is string value) 186variableDeclarator.Identifier.Value is not string fieldName || 228identifierName.Identifier.Value is string value &&
Microsoft.NetCore.Analyzers\Performance\CSharpUseStartsWithInsteadOfIndexOfComparisonWithZero.Fixer.cs (1)
38if (firstArgument.NameColon is null or { Name.Identifier.Value: "value" })
Microsoft.NetCore.Analyzers\Performance\CSharpUseStringContainsCharOverloadWithSingleCharactersFixer.cs (1)
49if (sourceLiteralExpressionSyntax.Token.Value is string sourceLiteralValue && char.TryParse(sourceLiteralValue, out parsedCharLiteral))
Microsoft.NetCore.Analyzers\Performance\CSharpUseStringMethodCharOverloadWithSingleCharacters.Fixer.cs (1)
52if (sourceLiteralExpressionSyntax.Token.Value is string sourceLiteralValue && char.TryParse(sourceLiteralValue, out parsedCharLiteral))
Microsoft.NetCore.Analyzers\Runtime\CSharpPreferStreamAsyncMemoryOverloads.Fixer.cs (2)
33identifierNameNode.Identifier.Value!.Equals(name) && 67literal.Token.Value is int value && value == 0)
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
155lineDirective.Line.Value is int) 157info = new ExternalSourceInfo((int)lineDirective.Line.Value, false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1804var name = memberAccessExpression.Name.Identifier.Value;
Microsoft.CodeAnalysis.Features (2)
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
155var value = piece.GetFirstToken().Value?.ToString() ?? piece.GetFirstToken().ValueText;
FindUsages\AbstractFindUsagesService_FindReferences.cs (1)
196var tokenValue = token.Value;
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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
147info = New ExternalSourceInfo(CInt(DirectCast(node, ExternalSourceDirectiveTriviaSyntax).LineStart.Value), False)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
909Dim name = memberAccessExpression.Name.Identifier.Value
Microsoft.CodeAnalysis.VisualBasic.Features (2)
ConvertForToForEach\VisualBasicConvertForToForEachCodeRefactoringProvider.vb (2)
62If TypeOf subtractionRight?.Token.Value Is Integer AndAlso 63DirectCast(subtractionRight.Token.Value, Integer) = 1 Then
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (7)
Microsoft.NetCore.Analyzers\Performance\BasicUseStartsWithInsteadOfIndexOfComparisonWithZero.Fixer.vb (1)
25Dim charValueAsString = DirectCast(charArgumentSyntax.Expression, LiteralExpressionSyntax).Token.Value.ToString()
Microsoft.NetCore.Analyzers\Performance\BasicUseStringContainsCharOverloadWithSingleCharactersFixer.vb (2)
45If TypeOf sourceLiteralExpressionSyntax.Token.Value IsNot String Then 49Dim sourceLiteralValue = CType(sourceLiteralExpressionSyntax.Token.Value, String)
Microsoft.NetCore.Analyzers\Performance\BasicUseStringMethodCharOverloadWithSingleCharacters.Fixer.vb (2)
47If TypeOf sourceLiteralExpressionSyntax.Token.Value IsNot String Then 51Dim sourceLiteralValue = CType(sourceLiteralExpressionSyntax.Token.Value, String)
Microsoft.NetCore.Analyzers\Runtime\BasicPreferStreamAsyncMemoryOverloads.Fixer.vb (2)
65If TypeOf literal.Token.Value IsNot Integer Then 69Dim value = DirectCast(literal.Token.Value, Integer)
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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
147info = New ExternalSourceInfo(CInt(DirectCast(node, ExternalSourceDirectiveTriviaSyntax).LineStart.Value), False)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
909Dim 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)
157longLiterals.Add((char)token.Value!); 162var value = token.Value; 175longLiterals.Add(IntegerUtilities.ToInt64(token.Value)); 303if (numericToken.Value is not int version) 307if (dataToken.Value is not string data)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
523string? entryPoint = (string?)((LiteralExpressionSyntax)attrArg.Expression).Token.Value;
Microsoft.Interop.SourceGeneration (1)
ContainingSyntaxContext.cs (1)
97code = HashCode.Combine(code, containingSyntax.Identifier.Value);
Roslyn.Diagnostics.CSharp.Analyzers (4)
CSharpSpecializedEnumerableCreationAnalyzer.cs (1)
88AnalyzeArrayLength((int)literalRankSpecifier.Token.Value, arrayCreationExpression, addDiagnostic);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
155lineDirective.Line.Value is int) 157info = new ExternalSourceInfo((int)lineDirective.Line.Value, false);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1804var name = memberAccessExpression.Name.Identifier.Value;
Roslyn.Diagnostics.VisualBasic.Analyzers (4)
BasicSpecializedEnumerableCreationAnalyzer.vb (2)
91Debug.Assert(literalRankSpecifier.Token.Value IsNot Nothing) 92AnalyzeArrayLength(DirectCast(literalRankSpecifier.Token.Value, Integer), arrayCreationExpression, addDiagnostic)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (1)
147info = New ExternalSourceInfo(CInt(DirectCast(node, ExternalSourceDirectiveTriviaSyntax).LineStart.Value), False)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (1)
909Dim name = memberAccessExpression.Name.Identifier.Value