61 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)
7560var value = node.Token.Value; 7607var value = (string)node.Token.Value;
Binder\Binder_Operators.cs (4)
4695if (token.Value is uint) 4697uint value = (uint)token.Value; 4710else if (token.Value is ulong) 4712var 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)
155characterLiteral.Token.Value is char charValue) 172literal.Token.Value is string value) 185variableDeclarator.Identifier.Value is not string fieldName || 227identifierName.Identifier.Value is string value &&
Microsoft.NetCore.Analyzers\Performance\CSharpUseStartsWithInsteadOfIndexOfComparisonWithZero.Fixer.cs (1)
58if (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.NetAnalyzers (7)
Microsoft.NetCore.Analyzers\Performance\BasicUseStartsWithInsteadOfIndexOfComparisonWithZero.Fixer.vb (1)
59Dim 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)
50If TypeOf sourceLiteralExpressionSyntax.Token.Value IsNot String Then 54Dim 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.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.Extensions.Configuration.Binder.SourceGeneration (2)
ConfigurationBindingGenerator.Suppressor.cs (2)
149keys.Add(MakeV0Key(filePathLiteral.Token.ValueText, (int)lineLiteral.Token.Value!, (int)colLiteral.Token.Value!));
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
532string? 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;