1 implementation of Value
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
6240public IOperation Value { get; }
119 references to Value
ILLink.RoslynAnalyzer (8)
DataFlow\LocalDataFlowVisitor.cs (8)
249 TValue value = Visit (operation.Value, state); 261 TValue value = Visit (operation.Value, state); 292 return Visit (operation.Value, state); 298 TValue value = Visit (operation.Value, state); 319 TValue value = Visit (operation.Value, state); 329 TValue value = Visit (operation.Value, state); 336 TValue value = Visit (operation.Value, state); 368 return Visit (operation.Value, state);
Microsoft.AspNetCore.Analyzers (2)
OptionsAnalyzer.cs (2)
28operation.Value.ConstantValue.HasValue && 33options.Add(new OptionsItem(property.Property, operation.Value.ConstantValue.Value));
Microsoft.AspNetCore.App.Analyzers (1)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
184if (propertyReferenceOperation.Parent is IAssignmentOperation { Value: IPropertyReferenceOperation valueProperty }
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
ActualApiResponseMetadataFactory.cs (1)
175if (TryGetStatusCode(assignmentOperation.Value, out var statusCodeValue))
Microsoft.CodeAnalysis (11)
Generated\Operations.Generated.cs (2)
3087/// <item><description><see cref="IAssignmentOperation.Target" /> is evaluated for null. If it is null, <see cref="IAssignmentOperation.Value" /> is evaluated and assigned to target</description></item> 3088/// <item><description><see cref="IAssignmentOperation.Value" /> is conditionally evaluated if <see cref="IAssignmentOperation.Target" /> is null, and the result is assigned into <see cref="IAssignmentOperation.Target" /></description></item>
Operations\ControlFlowGraphBuilder.cs (9)
2103IOperation value = VisitRequired(operation.Value); 3214IOperation whenNullValue = VisitRequired(operation.Value); 3266IOperation whenNullValue = VisitRequired(operation.Value); 6093IOperation right = VisitRequired(assignmentOperation.Value); 6402IOperation visitedValue = visitAndCaptureInitializer(propertyReference.Property, simpleAssignment.Value); 6664(IOperation visitedTarget, IOperation visitedValue) = VisitPreservingTupleOperations(operation.Target, operation.Value); 7990AddStatement(VisitRequired(simpleAssignment.Value)); 8005AddStatement(VisitRequired(simpleAssignment.Value)); 8010VisitAndCapture(simpleAssignment.Value, valueCaptureId);
Microsoft.CodeAnalysis.CodeStyle (9)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
202!valueAnalyzer.TryAddHashedSymbol(simpleAssignment.Value, seenHash: false))
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
65builder.Add((propertyReference.Property.Name, simpleAssignment.Value));
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
643return IsRemovableAssignmentValueWithoutSideEffects(assignment.Value);
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentDiagnosticAnalyzer.cs (2)
37trueAssignment?.Value ?? trueStatement, 38falseAssignment?.Value ?? falseStatement,
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (2)
132assignmentExpression.Value.Syntax.GetLocation(), 190if (!TryGetLocalOrParameterSymbol(assignmentExpression.Value, out var assignmentValue))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
136simpleAssignmentOperation.Value == operation &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
423initializerValue = simpleAssignment.Value;
Microsoft.CodeAnalysis.CodeStyle.Fixes (6)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (2)
79trueAssignment?.Value ?? trueStatement, 80falseAssignment?.Value ?? falseStatement,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\InitializeParameterHelpersCore.cs (2)
126Value: IConversionOperation { Operand: ITupleOperation valueTupleTemp }, 143=> IsParameterReferenceOrCoalesceOfParameterReference(assignmentExpression.Value, parameter);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (2)
83var typeInfo = semanticModel.GetTypeInfo(assignmentOperation.Value.Syntax, cancellationToken); 90stack.Push(assignmentOperation.Value);
Microsoft.CodeAnalysis.CSharp (1)
CSharpExtensions.cs (1)
805/// conversion is applied before the operator is applied to the result of this conversion and <see cref="IAssignmentOperation.Value"/>.
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
204IsObjectCreationOperation(assignment.Value))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
385Value: IOperation { Syntax: ExpressionSyntax syntax } 440Value: IOperation assignment
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
204IsObjectCreationOperation(assignment.Value))
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
385Value: IOperation { Syntax: ExpressionSyntax syntax } 440Value: IOperation assignment
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IConversionExpression.cs (1)
5294Assert.Equal(CodeAnalysis.NullableAnnotation.Annotated, iopTree.Value.Type.NullableAnnotation);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (29)
Semantics\DynamicTests.cs (27)
6697AssertEx.Equal("System.Int32", operation.Value.Type.ToTestDisplayString()); 6806AssertEx.Equal("System.Int32", operation.Value.Type.ToTestDisplayString()); 6916AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 7013AssertEx.Equal("System.Object", operation.Value.Type.ToTestDisplayString()); 7190AssertEx.Equal("System.Int32", operation.Value.Type.ToTestDisplayString()); 7303AssertEx.Equal("System.Int32", operation.Value.Type.ToTestDisplayString()); 7419AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 7533AssertEx.Equal("C2", operation.Value.Type.ToTestDisplayString()); 8309AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 8418AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 8527AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 8637AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 8746AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 8815AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 8887AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 8943AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 9033AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 9124AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 9214AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 9270AssertEx.Equal("dynamic", operation.Value.Type.ToTestDisplayString()); 10046Assert.Equal(tupleTypeInfo.Type, operation.Value.Type); 10174Assert.Equal(tupleTypeInfo.Type, operation.Value.Type); 10302Assert.Equal(tupleTypeInfo.Type, operation.Value.Type); 10456Assert.Equal(tupleTypeInfo.Type, operation.Value.Type); 10590Assert.Equal("C2", operation.Value.Type.ToTestDisplayString()); 10738Assert.Equal("C2", operation.Value.Type.ToTestDisplayString()); 11008Assert.Equal("C2", operation.Value.Type.ToTestDisplayString());
Semantics\ObjectAndCollectionInitializerTests.cs (2)
4245AssertEx.Equal("System.Int32", operation.Value.Type.ToTestDisplayString()); 4299AssertEx.Equal("System.Int32", operation.Value.Type.ToTestDisplayString());
Microsoft.CodeAnalysis.Features (11)
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (1)
612=> InitializeParameterHelpersCore.IsParameterReferenceOrCoalesceOfParameterReference(assignmentExpression.Value, parameter);
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.cs (1)
202!valueAnalyzer.TryAddHashedSymbol(simpleAssignment.Value, seenHash: false))
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
65builder.Add((propertyReference.Property.Name, simpleAssignment.Value));
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
643return IsRemovableAssignmentValueWithoutSideEffects(assignment.Value);
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentDiagnosticAnalyzer.cs (2)
37trueAssignment?.Value ?? trueStatement, 38falseAssignment?.Value ?? falseStatement,
src\Analyzers\Core\Analyzers\UseThrowExpression\AbstractUseThrowExpressionDiagnosticAnalyzer.cs (2)
132assignmentExpression.Value.Syntax.GetLocation(), 190if (!TryGetLocalOrParameterSymbol(assignmentExpression.Value, out var assignmentValue))
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (2)
79trueAssignment?.Value ?? trueStatement, 80falseAssignment?.Value ?? falseStatement,
ValueTracking\ValueTracker.OperationCollector.cs (1)
99=> VisitAsync(assignmentOperation.Value, cancellationToken);
Microsoft.CodeAnalysis.Test.Utilities (18)
Compilation\ControlFlowGraphVerifier.cs (1)
1003assignment.Value.Syntax == forStmt.StepClause.StepValue)
Compilation\OperationTreeVerifier.cs (5)
1313Visit(operation.Value, nameof(operation.Value)); 1669Visit(operation.Value, "Right"); 1678Visit(operation.Value, "Right"); 1715Visit(operation.Value, "Right");
Compilation\TestOperationVisitor.cs (2)
911AssertEx.Equal(new[] { operation.Target, operation.Value }, operation.ChildOperations); 1158AssertEx.Equal(new[] { operation.Target, operation.Value }, operation.ChildOperations);
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (1)
62AssignTo(assignment.Target, localsSourceTypes, fieldsSourceTypes, assignment.Value);
Diagnostics\OperationTestAnalyzer.cs (9)
175setupAssignment.Value.ConstantValue.HasValue && 176setupAssignment.Value.Type.SpecialType == SpecialType.System_Int32) 180int initialValue = (int)setupAssignment.Value.ConstantValue.Value; 240advanceAssignment.Value.Kind == OperationKind.Binary && 241advanceAssignment.Value.Type.SpecialType == SpecialType.System_Int32) 245IBinaryOperation advanceOperation = (IBinaryOperation)advanceAssignment.Value; 264advanceAssignment.Value.ConstantValue.HasValue && 265advanceAssignment.Value.Type.SpecialType == SpecialType.System_Int32) 268advanceIncrementOpt = advanceAssignment.Value.ConstantValue;
Microsoft.CodeAnalysis.VisualBasic (1)
VisualBasicExtensions.vb (1)
1435''' conversion is applied before the operator is applied to the result of this conversion and <see cref="IAssignmentOperation.Value"/>.
Microsoft.CodeAnalysis.Workspaces (6)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
136simpleAssignmentOperation.Value == operation &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
423initializerValue = simpleAssignment.Value;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\InitializeParameterHelpersCore.cs (2)
126Value: IConversionOperation { Operand: ITupleOperation valueTupleTemp }, 143=> IsParameterReferenceOrCoalesceOfParameterReference(assignmentExpression.Value, parameter);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (2)
83var typeInfo = semanticModel.GetTypeInfo(assignmentOperation.Value.Syntax, cancellationToken); 90stack.Push(assignmentOperation.Value);
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (8)
IOperation\IOperationTests.vb (8)
65Assert.Equal(assignment1.Value.Kind, OperationKind.Binary) 66Dim add1 As IBinaryOperation = DirectCast(assignment1.Value, IBinaryOperation) 98Assert.Equal(assignment2.Value.Kind, OperationKind.Binary) 99Dim add2 As IBinaryOperation = DirectCast(assignment2.Value, IBinaryOperation) 131Assert.Equal(assignment3.Value.Kind, OperationKind.Unary) 132Dim negate3 As IUnaryOperation = DirectCast(assignment3.Value, IUnaryOperation) 193Dim value1 As ILocalReferenceOperation = TryCast(assignment1.Value, ILocalReferenceOperation) 221Dim value2 As ILocalReferenceOperation = TryCast(assignment2.Value, ILocalReferenceOperation)