2 implementations of ChildOperations
Microsoft.CodeAnalysis (1)
Operations\Operation.cs (1)
110
public IOperation.OperationList
ChildOperations
=> new IOperation.OperationList(this);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Semantics\CollectionExpressionTests.cs (1)
27094
IOperation.OperationList IOperation.
ChildOperations
=> throw null;
191 references to ChildOperations
ConfigurationSchemaGenerator (2)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (2)
172
ITypeOfOperation? typeOfOperation = GetArgumentForParameterAtIndex(operation.Arguments, 1).
ChildOperations
.FirstOrDefault() as ITypeOfOperation;
227
ITypeOfOperation? typeOfOperation = GetArgumentForParameterAtIndex(operation.Arguments, 1).
ChildOperations
.FirstOrDefault() as ITypeOfOperation;
ILLink.RoslynAnalyzer (1)
DataFlow\OperationWalker.cs (1)
16
foreach (var child in operation.
ChildOperations
)
Microsoft.Analyzers.Extra (6)
AsyncCallInsideUsingBlockAnalyzer.cs (1)
213
.
ChildOperations
CallAnalysis\Fixers\LegacyLoggingFixer.FixDetails.cs (5)
45
var children = op.
ChildOperations
.ToArray();
61
foreach (var o in children[0].
ChildOperations
)
66
_ = sb.Append(stringOp.
ChildOperations
.First().ConstantValue.Value as string);
70
var operation = intOp.
ChildOperations
.First();
92
interpolationArgs.Add(intOp.
ChildOperations
.First());
Microsoft.AspNetCore.App.Analyzers (7)
Authorization\AddAuthorizationBuilderAnalyzer.cs (4)
76
var allOperationsInvolveAuthorizationOptions = configureBlockOperation.
ChildOperations
105
if (configureArgumentOperation is {
ChildOperations
: { Count: 1 } argumentChildOperations }
119
if (configureDelegateCreationOperation is {
ChildOperations
: { Count: 1 } delegateCreationChildOperations }
133
if (configureAnonymousFunctionOperation is {
ChildOperations
: { Count: 1 } anonymousFunctionChildOperations }
RouteHandlers\DetectMisplacedLambdaAttribute.cs (3)
28
if (lambda.
ChildOperations
.Count != 1 || lambda.
ChildOperations
.FirstOrDefault() is not IBlockOperation blockOperation)
73
foreach (var op in Enumerable.Reverse(blockOperation.
ChildOperations
))
Microsoft.CodeAnalysis (8)
Operations\ControlFlowGraphBuilder.cs (4)
1623
Debug.Assert(rewrittenThrow.
ChildOperations
.IsEmpty());
1641
Debug.Assert(rewrittenThrow.
ChildOperations
.IsEmpty());
2930
Debug.Assert(rewrittenThrow.
ChildOperations
.IsEmpty());
3072
Debug.Assert(rewrittenThrow.
ChildOperations
.IsEmpty());
Operations\IOperation.cs (2)
48
/// An array of child operations for this operation. Deprecated: please use <see cref="
ChildOperations
"/>.
50
[Obsolete($"This API has performance penalties, please use {nameof(
ChildOperations
)} instead.", error: false)]
Operations\OperationExtensions.cs (2)
97
stack.Push(operation.
ChildOperations
.GetEnumerator());
117
stack.Push(current.
ChildOperations
.GetEnumerator());
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
255
foreach (var child in operation.
ChildOperations
)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
483
return operation.
ChildOperations
.All(IsSafeAssignment);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (1)
483
return operation.
ChildOperations
.All(IsSafeAssignment);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (14)
IOperation\IOperationTests_IVariableDeclaration.cs (14)
613
Assert.Equal(2, declarator.
ChildOperations
.Count());
614
Assert.Equal(OperationKind.Literal, declarator.
ChildOperations
.First().Kind);
615
Assert.Equal(OperationKind.VariableInitializer, declarator.
ChildOperations
.ElementAt(1).Kind);
635
Assert.Equal(1, declarator.
ChildOperations
.Count());
636
Assert.Equal(OperationKind.Literal, declarator.
ChildOperations
.First().Kind);
656
Assert.Equal(1, declarator.
ChildOperations
.Count());
657
Assert.Equal(OperationKind.VariableInitializer, declarator.
ChildOperations
.ElementAt(0).Kind);
676
Assert.Empty(operation.
ChildOperations
);
851
Assert.Equal(2, declaration.
ChildOperations
.Count());
852
Assert.Equal(OperationKind.Literal, declaration.
ChildOperations
.First().Kind);
853
Assert.Equal(OperationKind.VariableDeclarator, declaration.
ChildOperations
.ElementAt(1).Kind);
873
Assert.Equal(2, declaration.
ChildOperations
.Count());
874
Assert.Equal(OperationKind.Literal, declaration.
ChildOperations
.First().Kind);
875
Assert.Equal(OperationKind.VariableDeclarator, declaration.
ChildOperations
.ElementAt(1).Kind);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\OperatorTests.cs (1)
11435
foreach (var child in iop.
ChildOperations
)
Microsoft.CodeAnalysis.Features (3)
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
255
foreach (var child in operation.
ChildOperations
)
ValueTracking\ValueTracker.OperationCollector.cs (2)
90
foreach (var child in operation.
ChildOperations
)
95
return operation.
ChildOperations
.Any();
Microsoft.CodeAnalysis.Test.Utilities (144)
CommonTestBase.cs (1)
619
foreach (var child in operation.
ChildOperations
)
Compilation\OperationTreeVerifier.cs (2)
397
Debug.Assert(operation.
ChildOperations
.All(o => o != null));
399
var children = operation.
ChildOperations
.ToImmutableArray();
Compilation\TestOperationVisitor.cs (141)
67
foreach (IOperation child in operation.
ChildOperations
)
77
Assert.Same(builder[0], operation.
ChildOperations
.First());
78
Assert.Same(builder[^1], operation.
ChildOperations
.Last());
80
var forwards = operation.
ChildOperations
.GetEnumerator();
87
var reversed = operation.
ChildOperations
.Reverse().GetEnumerator();
96
Assert.Throws<InvalidOperationException>(() => operation.
ChildOperations
.First());
97
Assert.Throws<InvalidOperationException>(() => operation.
ChildOperations
.Last());
100
foreach (IOperation child in operation.
ChildOperations
.Reverse())
122
AssertEx.Equal(operation.Operations, operation.
ChildOperations
);
128
AssertEx.Equal(operation.Declarations, operation.
ChildOperations
);
143
AssertEx.Equal(children, operation.
ChildOperations
);
157
AssertEx.Equal(children, operation.
ChildOperations
);
165
AssertEx.Equal(new[] { operation.Value }.Concat(operation.Cases), operation.
ChildOperations
);
172
AssertEx.Equal(operation.Clauses.Concat(operation.Body), operation.
ChildOperations
);
217
AssertEx.Equal(new[] { operation.Value }, operation.
ChildOperations
);
232
AssertEx.Equal(new[] { operation.Value }, operation.
ChildOperations
);
239
Assert.Empty(operation.
ChildOperations
);
285
AssertEx.Equal(children, operation.
ChildOperations
);
305
AssertEx.Equal(children, operation.
ChildOperations
);
326
AssertEx.Equal(children, operation.
ChildOperations
);
335
AssertEx.Equal(children, operation.
ChildOperations
);
372
Assert.Empty(operation.
ChildOperations
);
376
Assert.Same(operation.Operation, operation.
ChildOperations
.Single());
396
Assert.Empty(operation.
ChildOperations
);
402
Assert.Empty(operation.
ChildOperations
);
411
Assert.Empty(operation.
ChildOperations
);
415
Assert.Same(operation.ReturnedValue, operation.
ChildOperations
.Single());
422
AssertEx.Equal(new[] { operation.LockedValue, operation.Body }, operation.
ChildOperations
);
436
AssertEx.Equal(children, operation.
ChildOperations
);
457
AssertEx.Equal(children, operation.
ChildOperations
);
464
AssertEx.Equal(new[] { operation.Resources, operation.Body }, operation.
ChildOperations
);
484
AssertEx.Equal(new[] { operation.Variables, operation.Body }, operation.
ChildOperations
);
490
AssertEx.Equal(operation.Elements, operation.
ChildOperations
);
496
Assert.Same(operation.Operand, operation.
ChildOperations
.Single());
502
AssertEx.Equal(new[] { operation.Group, operation.Aggregation }, operation.
ChildOperations
);
508
Assert.Same(operation.Operation, operation.
ChildOperations
.Single());
514
AssertEx.Equal(new[] { operation.Value, operation.Body }, operation.
ChildOperations
);
520
Assert.Empty(operation.
ChildOperations
);
526
Assert.Empty(operation.
ChildOperations
);
551
AssertEx.Equal(children, operation.
ChildOperations
);
573
AssertEx.Equal(children, operation.
ChildOperations
);
582
Assert.Same(operation.Value, operation.
ChildOperations
.Single());
595
Assert.Empty(operation.
ChildOperations
);
601
AssertEx.Equal(new[] { operation.ArrayReference }.Concat(operation.Indices), operation.
ChildOperations
);
607
AssertEx.Equal(new[] { operation.Instance, operation.Argument }, operation.
ChildOperations
);
616
AssertEx.Equal(new[] { operation.Instance, operation.Argument }, operation.
ChildOperations
);
622
Assert.Same(operation.Pointer, operation.
ChildOperations
.Single());
630
Assert.Empty(operation.
ChildOperations
);
637
Assert.Empty(operation.
ChildOperations
);
643
Assert.Empty(operation.
ChildOperations
);
676
AssertEx.Equal(children, operation.
ChildOperations
);
723
AssertEx.Equal(new[] { operation.EventReference, operation.HandlerValue }, operation.
ChildOperations
);
730
AssertEx.Equal(new[] { operation.Operation, operation.WhenNotNull }, operation.
ChildOperations
);
736
Assert.Empty(operation.
ChildOperations
);
742
Assert.Empty(operation.
ChildOperations
);
755
Assert.Same(operation.Operand, operation.
ChildOperations
.Single());
790
AssertEx.Equal(new[] { operation.LeftOperand, operation.RightOperand }, operation.
ChildOperations
);
835
AssertEx.Equal(new[] { operation.LeftOperand, operation.RightOperand }, operation.
ChildOperations
);
863
Assert.Same(operation.Operand, operation.
ChildOperations
.Single());
893
AssertEx.Equal(new[] { operation.Condition, operation.WhenTrue, operation.WhenFalse }, operation.
ChildOperations
);
897
AssertEx.Equal(new[] { operation.Condition, operation.WhenTrue }, operation.
ChildOperations
);
904
AssertEx.Equal(new[] { operation.Value, operation.WhenNull }, operation.
ChildOperations
);
911
AssertEx.Equal(new[] { operation.Target, operation.Value }, operation.
ChildOperations
);
919
Assert.Same(operation.ValueOperand, operation.
ChildOperations
.Single());
926
Assert.Empty(operation.
ChildOperations
);
933
Assert.Empty(operation.
ChildOperations
);
940
Assert.Same(operation.Body, operation.
ChildOperations
.Single());
947
Assert.Empty(operation.
ChildOperations
);
957
var children = operation.
ChildOperations
.ToImmutableArray();
972
Assert.Empty(operation.
ChildOperations
);
979
Assert.Empty(operation.
ChildOperations
);
985
Assert.Empty(operation.
ChildOperations
);
992
Assert.Same(operation.Operation, operation.
ChildOperations
.Single());
998
Assert.Same(operation.Argument, operation.
ChildOperations
.Single());
1006
Assert.Empty(operation.
ChildOperations
);
1010
Assert.Same(operation.Exception, operation.
ChildOperations
.Single());
1017
Assert.Same(operation.Reference, operation.
ChildOperations
.Single());
1042
AssertEx.Equal(children, operation.
ChildOperations
);
1048
AssertEx.Equal(operation.Initializers, operation.
ChildOperations
);
1069
AssertEx.Equal(children, operation.
ChildOperations
);
1075
AssertEx.Equal(new[] { operation.Operation }.Concat(operation.Arguments), operation.
ChildOperations
);
1081
AssertEx.Equal(new[] { operation.Operation }.Concat(operation.Arguments), operation.
ChildOperations
);
1087
AssertEx.Equal(operation.Initializers, operation.
ChildOperations
);
1093
AssertEx.Equal(new[] { operation.InitializedMember, operation.Initializer }, operation.
ChildOperations
);
1099
Assert.Same(operation.Value, operation.
ChildOperations
.Single());
1146
AssertEx.Equal(children, operation.
ChildOperations
);
1153
AssertEx.Equal(operation.ElementValues, operation.
ChildOperations
);
1158
AssertEx.Equal(new[] { operation.Target, operation.Value }, operation.
ChildOperations
);
1206
Assert.Same(operation.Target, operation.
ChildOperations
.Single());
1212
Assert.Same(operation.Operand, operation.
ChildOperations
.Single());
1229
Assert.Empty(operation.
ChildOperations
);
1233
Assert.Same(operation.Instance, operation.
ChildOperations
.Single());
1240
Assert.Empty(operation.
ChildOperations
);
1248
Assert.Empty(operation.
ChildOperations
);
1252
Assert.Same(operation.Initializer, operation.
ChildOperations
.Single());
1261
Assert.Empty(operation.
ChildOperations
);
1265
Assert.Same(operation.Initializer, operation.
ChildOperations
.Single());
1278
AssertEx.Equal(operation.Elements, operation.
ChildOperations
);
1284
AssertEx.Equal(operation.Parts, operation.
ChildOperations
);
1294
Assert.Same(operation.Text, operation.
ChildOperations
.Single());
1315
AssertEx.Equal(children, operation.
ChildOperations
);
1322
AssertEx.Equal(children, operation.
ChildOperations
);
1332
AssertEx.Equal(new[] { operation.Left, operation.Right }, operation.
ChildOperations
);
1369
Assert.Same(operation.Value, operation.
ChildOperations
.Single());
1382
Assert.Same(operation.Value, operation.
ChildOperations
.Single());
1390
var children = operation.
ChildOperations
.ToArray();
1400
Assert.Same(operation.Pattern, operation.
ChildOperations
.Single());
1408
Assert.Empty(operation.
ChildOperations
);
1441
Assert.Empty(operation.
ChildOperations
);
1451
Assert.Same(operation.Pattern, operation.
ChildOperations
.Single());
1455
Assert.Empty(operation.
ChildOperations
);
1474
AssertEx.Equal(children, operation.
ChildOperations
);
1518
AssertEx.Equal(children, operation.
ChildOperations
);
1525
AssertEx.Equal(children, operation.
ChildOperations
);
1554
AssertEx.Equal(children, operation.
ChildOperations
);
1568
AssertEx.Equal(children, operation.
ChildOperations
);
1574
AssertEx.Equal(new[] { operation.Value, operation.Pattern }, operation.
ChildOperations
);
1585
AssertEx.Equal(new[] { operation.Pattern, operation.Guard }, operation.
ChildOperations
);
1589
Assert.Same(operation.Pattern, operation.
ChildOperations
.Single());
1596
Assert.Same(operation.Operation, operation.
ChildOperations
.Single());
1602
Assert.Same(operation.Expression, operation.
ChildOperations
.Single());
1614
Assert.Same(operation.Target, operation.
ChildOperations
.Single());
1620
AssertEx.Equal(new IOperation[] { operation.EventReference }.Concat(operation.Arguments), operation.
ChildOperations
);
1627
AssertEx.Equal(new[] { operation.MinimumValue, operation.MaximumValue }, operation.
ChildOperations
);
1653
AssertEx.Equal(builder, operation.
ChildOperations
);
1666
AssertEx.Equal(new[] { operation.BlockBody, operation.ExpressionBody }, operation.
ChildOperations
);
1670
Assert.Same(operation.BlockBody, operation.
ChildOperations
.Single());
1675
Assert.Same(operation.ExpressionBody, operation.
ChildOperations
.Single());
1679
Assert.Empty(operation.
ChildOperations
);
1686
Assert.Empty(operation.
ChildOperations
);
1696
Assert.Empty(operation.
ChildOperations
);
1703
Assert.Same(operation.Value, operation.
ChildOperations
.Single());
1735
Assert.Empty(operation.
ChildOperations
);
1742
Assert.Same(operation.Operand, operation.
ChildOperations
.Single());
1749
Assert.Empty(operation.
ChildOperations
);
1756
Assert.Empty(operation.
ChildOperations
);
1765
IOperation[] children = operation.
ChildOperations
.ToArray();
1785
AssertEx.Equal(operation.Clauses, operation.
ChildOperations
);
1792
AssertEx.Equal(SpecializedCollections.SingletonEnumerable(operation.Operand).Concat(operation.DimensionSizes), operation.
ChildOperations
);
1798
AssertEx.Equal(SpecializedCollections.SingletonEnumerable(operation.DeclarationGroup), operation.
ChildOperations
);
1821
AssertEx.Equal(children, operation.
ChildOperations
);
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Semantics\BinaryOperators.vb (1)
1521
For Each child In iop.
ChildOperations
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\NullableHelpers.cs (1)
128
foreach (var childOperation in operation.
ChildOperations
.Reverse())