29 instantiations of BoundObjectCreationExpression
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder_Invocation.cs (2)
1397defaultValue = new BoundObjectCreationExpression(syntax, methodSymbol, unknownArgument) { WasCompilerGenerated = true }; 1406defaultValue = new BoundObjectCreationExpression(syntax, methodSymbol, dispatchArgument) { WasCompilerGenerated = true };
Generated\BoundNodes.xml.Generated.cs (1)
6382var result = new BoundObjectCreationExpression(this.Syntax, constructor, constructorsGroup, arguments, argumentNamesOpt, argumentRefKindsOpt, expanded, argsToParamsOpt, defaultArguments, constantValueOpt, initializerExpressionOpt, wasTargetTyped, type, this.HasErrors);
Lowering\ClosureConversion\ClosureConversion.cs (1)
681new BoundObjectCreationExpression(syntax: syntax, constructor: constructor),
Lowering\LocalRewriter\LocalRewriter_AnonymousObjectCreation.cs (1)
23return new BoundObjectCreationExpression(
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (2)
1353return new BoundObjectCreationExpression( 1649return new BoundObjectCreationExpression(
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
322return new BoundObjectCreationExpression(syntax, spanConstructor, array); 442arrayOrList = new BoundObjectCreationExpression(syntax, synthesizedType.Constructors.Single(), fieldValue) { WasCompilerGenerated = true };
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (5)
115result = new BoundObjectCreationExpression(node.Syntax, ctor.AsMember((NamedTypeSymbol)node.Type), utf8Bytes, _factory.Literal(0), _factory.Literal(length)); 968return new BoundObjectCreationExpression(syntax, ctor, rewrittenConversion); 1079BoundExpression consequence = new BoundObjectCreationExpression( 1163return new BoundObjectCreationExpression( 1288return new BoundObjectCreationExpression(call.Syntax, ctor, call);
Lowering\LocalRewriter\LocalRewriter_Index.cs (3)
31return new BoundObjectCreationExpression(node.Syntax, node.MethodOpt, operand, fromEnd); 43BoundExpression indexCreation = new BoundObjectCreationExpression(node.Syntax, node.MethodOpt, boundOperandGetValueOrDefault, fromEnd); 79return new BoundObjectCreationExpression(syntax, nullableCtor, underlyingValue);
Lowering\LocalRewriter\LocalRewriter_Range.cs (1)
101BoundExpression consequence = new BoundObjectCreationExpression(node.Syntax, nullableCtor, rangeExpr);
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (2)
67BoundObjectCreationExpression currentCreation = new BoundObjectCreationExpression(syntax, smallestConstructor, smallestCtorArguments); 94currentCreation = new BoundObjectCreationExpression(syntax, constructor, ctorArguments);
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (4)
368BoundExpression consequence = new BoundObjectCreationExpression( 689BoundExpression consequence = new BoundObjectCreationExpression(syntax, ctor, userDefinedCall); 756boundOne = new BoundObjectCreationExpression(node.Syntax, ctor, boundOne); 847BoundExpression consequence = new BoundObjectCreationExpression(syntax, ctor, methodCall);
Lowering\SyntheticBoundNodeFactory.cs (3)
798=> new BoundObjectCreationExpression(Syntax, ctor, args) { WasCompilerGenerated = true }; 801=> new BoundObjectCreationExpression( 818return new BoundObjectCreationExpression(Syntax, ctor, args) { WasCompilerGenerated = true };
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (2)
510new BoundObjectCreationExpression( 587new BoundObjectCreationExpression(
100 references to BoundObjectCreationExpression
Microsoft.CodeAnalysis.CSharp (100)
Binder\Binder.ValueChecks.cs (4)
4245var objectCreation = (BoundObjectCreationExpression)expr; 4986var objectCreation = (BoundObjectCreationExpression)expr;
Binder\Binder_Conversions.cs (1)
649(collectionCreation is BoundObjectCreationExpression creation && creation.Expanded == isExpanded && creation.Constructor == constructor));
Binder\Binder_Expressions.cs (5)
6611private BoundObjectCreationExpression BindClassCreationExpressionContinued( 6675var creation = new BoundObjectCreationExpression( 6868var creation = (BoundObjectCreationExpression)classCreation; 9150else if (convertedIndex is BoundObjectCreationExpression { Constructor: MethodSymbol constructor, Arguments: { Length: 2 } arguments, ArgsToParamsOpt: { IsDefaultOrEmpty: true }, InitializerExpressionOpt: null } &&
Binder\Binder_InterpolatedString.cs (3)
595if (outConstructorCall is not BoundObjectCreationExpression { ResultKind: LookupResultKind.Viable }) 608if (nonOutConstructorCall is BoundObjectCreationExpression { ResultKind: LookupResultKind.Viable }) 661Debug.Assert(constructorCall.HasErrors || constructorCall is BoundObjectCreationExpression or BoundDynamicObjectCreationExpression);
Binder\RefSafetyAnalysis.cs (1)
733public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node)
BoundTree\BoundExpression.cs (1)
536internal BoundObjectCreationExpression Update(
BoundTree\BoundObjectCreationExpression.cs (2)
18public BoundObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, 24public BoundObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<MethodSymbol> constructorsGroup, ImmutableArray<BoundExpression> arguments,
BoundTree\BoundTreeVisitors.cs (1)
118return VisitObjectCreationExpression(node as BoundObjectCreationExpression, arg);
BoundTree\Expression.cs (1)
149protected override ImmutableArray<BoundNode?> Children => StaticCast<BoundNode?>.From(this.Arguments.AddRange(BoundObjectCreationExpression.GetChildInitializers(this.InitializerExpressionOpt)));
BoundTree\InterpolatedStringHandlerData.cs (3)
37Debug.Assert(construction is BoundObjectCreationExpression or BoundDynamicObjectCreationExpression or BoundBadExpression); 54public readonly BoundObjectCreationExpression GetValidConstructor() 55=> (BoundObjectCreationExpression)Construction;
CodeGen\EmitExpression.cs (6)
107EmitObjectCreationExpression((BoundObjectCreationExpression)expression, used); 2268private static int GetObjCreationStackBehavior(BoundObjectCreationExpression objCreation) 2421private void EmitObjectCreationExpression(BoundObjectCreationExpression expression, bool used) 2462private bool TryEmitOptimizedReadonlySpan(BoundObjectCreationExpression expression, bool used, BoundExpression inPlaceTarget, out bool avoidInPlace) 2615if (right is BoundObjectCreationExpression objCreation) 2687private bool TryInPlaceCtorCall(BoundExpression target, BoundObjectCreationExpression objCreation, bool used)
CodeGen\Optimizer.cs (3)
952((BoundObjectCreationExpression)right).Constructor.ParameterCount != 0); 1316public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node) 2141public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Compilation\CSharpSemanticModel.cs (2)
3662var boundObjectCreation = (BoundObjectCreationExpression)boundNode;
FlowAnalysis\AbstractFlowPass.cs (1)
1971public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
FlowAnalysis\DefiniteAssignment.cs (2)
941var init = (BoundObjectCreationExpression)value;
FlowAnalysis\NullableWalker.cs (2)
3588public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 3864TrackNullableStateOfTupleElements(slot, containingType, arguments, argumentTypes, ((BoundObjectCreationExpression)node).ArgsToParamsOpt, useRestField: true);
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
19/// <see cref="BoundObjectCreationExpression"/>, or the input expression of a pattern-matching operation.
Generated\BoundNodes.xml.Generated.cs (10)
6378public BoundObjectCreationExpression Update(MethodSymbol constructor, ImmutableArray<MethodSymbol> constructorsGroup, ImmutableArray<BoundExpression> arguments, ImmutableArray<string?> argumentNamesOpt, ImmutableArray<RefKind> argumentRefKindsOpt, bool expanded, ImmutableArray<int> argsToParamsOpt, BitVector defaultArguments, ConstantValue? constantValueOpt, BoundObjectInitializerExpressionBase? initializerExpressionOpt, bool wasTargetTyped, TypeSymbol type) 6382var result = new BoundObjectCreationExpression(this.Syntax, constructor, constructorsGroup, arguments, argumentNamesOpt, argumentRefKindsOpt, expanded, argsToParamsOpt, defaultArguments, constantValueOpt, initializerExpressionOpt, wasTargetTyped, type, this.HasErrors); 9163return VisitObjectCreationExpression((BoundObjectCreationExpression)node, arg); 9468public virtual R VisitObjectCreationExpression(BoundObjectCreationExpression node, A arg) => this.DefaultVisit(node, arg); 9704public virtual BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) => this.DefaultVisit(node); 10479public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 11762public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 14001public override BoundNode? VisitObjectCreationExpression(BoundObjectCreationExpression node) 14007BoundObjectCreationExpression updatedNode; 16440public override TreeDumperNode VisitObjectCreationExpression(BoundObjectCreationExpression node, object? arg) => new TreeDumperNode("objectCreationExpression", null, new TreeDumperNode[]
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (3)
227return VisitObjectCreationExpression((BoundObjectCreationExpression)node); 942private BoundExpression VisitObjectCreationExpression(BoundObjectCreationExpression node) 964private BoundExpression VisitObjectCreationExpressionInternal(BoundObjectCreationExpression node)
Lowering\DiagnosticsPass_ExpressionTrees.cs (1)
520public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Lowering\Extensions.cs (4)
53var creation = (BoundObjectCreationExpression)expr; 99var creation = (BoundObjectCreationExpression)expr;
Lowering\Instrumentation\CompoundInstrumenter.cs (1)
173public override BoundExpression InstrumentObjectCreationExpression(BoundObjectCreationExpression original, BoundExpression rewritten)
Lowering\Instrumentation\Instrumenter.cs (1)
246public virtual BoundExpression InstrumentObjectCreationExpression(BoundObjectCreationExpression original, BoundExpression rewritten)
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
546public override BoundExpression InstrumentObjectCreationExpression(BoundObjectCreationExpression original, BoundExpression rewritten)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
279public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
555loweredInput is BoundObjectCreationExpression expr && 611BoundObjectCreationExpression loweredInput,
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
552var call = _factory.New(constructor, arguments: [temp], argumentRefKinds: [asReadOnlySpan ? RefKindExtensions.StrictIn : RefKind.Ref]); 1007BoundObjectCreationExpression rewrittenReceiver;
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
908var objCreation = (BoundObjectCreationExpression)expression;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
905case BoundObjectCreationExpression { Arguments: { Length: 1 } args }:
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (1)
729else if (unloweredExpr is BoundObjectCreationExpression { Constructor: MethodSymbol constructor, Arguments: { Length: 2 } arguments, ArgsToParamsOpt: { IsDefaultOrEmpty: true }, InitializerExpressionOpt: null } &&
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (1)
31public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (2)
244Value: BoundObjectCreationExpression { Constructor: var objectCreationConstructor, Arguments: [BoundLocal constructorLocal] } 546var wrappedChar = new BoundObjectCreationExpression(
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (3)
82var construction = (BoundObjectCreationExpression)data.Construction; 392Debug.Assert(((BoundObjectCreationExpression)data.Construction).Arguments.All(
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (2)
205case BoundObjectCreationExpression { Arguments: { Length: 0 }, Type: { } eType } _ when eType.IsNullableType(): 207case BoundObjectCreationExpression { Arguments: { Length: 1 }, Type: { } eType } creation when eType.IsNullableType():
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (1)
67BoundObjectCreationExpression currentCreation = new BoundObjectCreationExpression(syntax, smallestConstructor, smallestCtorArguments);
Lowering\MethodToClassRewriter.cs (3)
561public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node) 563var rewritten = (BoundObjectCreationExpression?)base.VisitObjectCreationExpression(node);
Lowering\SpillSequenceSpiller.cs (3)
480var objectCreationExpression = (BoundObjectCreationExpression)expression; 1412public override BoundNode VisitObjectCreationExpression(BoundObjectCreationExpression node)
Lowering\SyntheticBoundNodeFactory.cs (6)
782public BoundObjectCreationExpression New(NamedTypeSymbol type, params BoundExpression[] args) 788public BoundObjectCreationExpression New(MethodSymbol ctor, params BoundExpression[] args) 791public BoundObjectCreationExpression New(NamedTypeSymbol type, ImmutableArray<BoundExpression> args) 797public BoundObjectCreationExpression New(MethodSymbol ctor, ImmutableArray<BoundExpression> args) 800public BoundObjectCreationExpression New(MethodSymbol constructor, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKinds) 815public BoundObjectCreationExpression New(WellKnownMember wm, ImmutableArray<BoundExpression> args)
Operations\CSharpOperationFactory.cs (5)
66return CreateBoundObjectCreationExpressionOperation((BoundObjectCreationExpression)boundNode); 701private IOperation CreateBoundObjectCreationExpressionOperation(BoundObjectCreationExpression boundObjectCreationExpression) 833ImmutableArray<IOperation> initializers = CreateFromArray<BoundExpression, IOperation>(BoundObjectCreationExpression.GetChildInitializers(boundObjectInitializerExpression)); 842ImmutableArray<IOperation> initializers = CreateFromArray<BoundExpression, IOperation>(BoundObjectCreationExpression.GetChildInitializers(boundCollectionInitializerExpression)); 1249return (expr.CollectionCreation as BoundObjectCreationExpression)?.Constructor;
Operations\CSharpOperationFactory_Methods.cs (2)
219var objectCreation = (BoundObjectCreationExpression)containingExpression;
Symbols\Source\ParameterHelpers.cs (3)
890return IsValidDefaultValue((BoundObjectCreationExpression)expression); 893return conversion is { Conversion.IsObjectCreation: true, Operand: BoundObjectCreationExpression { WasTargetTyped: true } operand } && 900private static bool IsValidDefaultValue(BoundObjectCreationExpression expression)