27 references to ToExpression
Microsoft.CodeAnalysis.CSharp (27)
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (3)
440resultDiscarded: resultsDiscarded).ToExpression(); 451false).ToExpression(), 455resultType: F.SpecialType(SpecialType.System_Boolean)).ToExpression();
Lowering\LocalRewriter\LocalRewriter_AssignmentOperator.cs (3)
59return _dynamicFactory.MakeDynamicSetMember(loweredReceiver, memberAccess.Name, loweredRight).ToExpression(); 114isChecked).ToExpression(); 159isCompoundAssignment, isChecked).ToExpression();
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (4)
236return _dynamicFactory.MakeDynamicBinaryOperator(operatorKind, loweredLeft, loweredRight, isCompoundAssignment, type).ToExpression(); 666var op = _dynamicFactory.MakeDynamicBinaryOperator(operatorKind, loweredLeft, loweredRight, isCompoundAssignment, type).ToExpression(); 677result = _dynamicFactory.MakeDynamicUnaryOperator(testOperator, op, boolean).ToExpression(); 730return _dynamicFactory.MakeDynamicUnaryOperator(negative ? UnaryOperatorKind.DynamicFalse : UnaryOperatorKind.DynamicTrue, loweredLeft, boolean).ToExpression();
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
82return _dynamicFactory.MakeDynamicInvocation(loweredExpression, loweredArguments, node.ArgumentNamesOpt, node.ArgumentRefKindsOpt, resultDiscarded).ToExpression(); 94resultDiscarded).ToExpression(); 1664return _dynamicFactory.MakeDynamicGetMember(loweredReceiver, node.Name, node.Indexed).ToExpression();
Lowering\LocalRewriter\LocalRewriter_CompoundAssignmentOperator.cs (2)
65var isEvent = _factory.StoreToTemp(_dynamicFactory.MakeDynamicIsEventTest(memberAccess.Name, memberAccess.Receiver).ToExpression(), out BoundAssignmentOperator isEventAssignment); 95var condition = _factory.Conditional(isEvent, invokeEventAccessor.ToExpression(), rewrittenAssignment, rewrittenAssignment.Type);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
538return _dynamicFactory.MakeDynamicConversion(rewrittenOperand, explicitCastInCode || conversion.Kind == ConversionKind.ExplicitDynamic, conversion.IsArrayIndex, @checked, rewrittenType).ToExpression();
Lowering\LocalRewriter\LocalRewriter_DelegateCreationExpression.cs (1)
23var loweredReceiver = _dynamicFactory.MakeDynamicConversion(loweredArgument, isExplicit: false, isArrayIndex: false, isChecked: false, resultType: node.Type).ToExpression();
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (2)
29result = _dynamicFactory.MakeDynamicGetMember(loweredReceiver, indexedPropertyName, resultIndexed: true).ToExpression(); 64refKinds).ToExpression();
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (1)
21var constructorInvocation = _dynamicFactory.MakeDynamicConstructorInvocation(node.Syntax, node.Type, loweredArguments, node.ArgumentNamesOpt, node.ArgumentRefKindsOpt).ToExpression();
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
134resultDiscarded: true).ToExpression();
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
109actualCall = _dynamicFactory.MakeDynamicConversion(actualCall, isExplicit: false, isArrayIndex: false, isChecked: false, boolType).ToExpression();
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (1)
555BoundExpression dynamicResult = _dynamicFactory.MakeDynamicBinaryOperator(single.Kind, left, right, isCompoundAssignment: false, _compilation.DynamicType).ToExpression();
Lowering\LocalRewriter\LocalRewriter_UnaryOperator.cs (3)
101return _dynamicFactory.MakeDynamicUnaryOperator(kind, loweredOperand, type).ToExpression(); 573return _dynamicFactory.MakeDynamicUnaryOperator(node.OperatorKind, rewrittenValueToIncrement, node.Type).ToExpression(); 870return _dynamicFactory.MakeDynamicGetMember(dynamicMemberAccess.Receiver, dynamicMemberAccess.Name, resultIndexed: false).ToExpression();
Lowering\LocalRewriter\LoweredDynamicOperation.cs (1)
18/// Most callers just call <see cref="ToExpression"/> to get the combo but some (object and array initializers)