1724 references to ExpressionType
Microsoft.AspNetCore.Components.Forms (6)
FieldIdentifier.cs (2)
101
&& unaryExpression.NodeType ==
ExpressionType
.Convert
144
case BinaryExpression binaryExpression when binaryExpression.NodeType ==
ExpressionType
.ArrayIndex:
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (4)
49
case
ExpressionType
.Constant:
53
case
ExpressionType
.Call:
80
case
ExpressionType
.ArrayIndex:
100
case
ExpressionType
.MemberAccess:
Microsoft.AspNetCore.Components.Web (4)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (4)
49
case
ExpressionType
.Constant:
53
case
ExpressionType
.Call:
80
case
ExpressionType
.ArrayIndex:
100
case
ExpressionType
.MemberAccess:
Microsoft.AspNetCore.JsonPatch (5)
JsonPatchDocumentOfT.cs (5)
681
case
ExpressionType
.ArrayIndex:
687
case
ExpressionType
.Call:
693
case
ExpressionType
.Convert:
697
case
ExpressionType
.MemberAccess:
704
case
ExpressionType
.Parameter:
Microsoft.AspNetCore.Mvc.Core (4)
ModelBinding\ModelBindingHelper.cs (4)
288
if (expression.NodeType ==
ExpressionType
.Convert ||
289
expression.NodeType ==
ExpressionType
.ConvertChecked)
295
if (expression.NodeType !=
ExpressionType
.MemberAccess)
304
if (memberExpression.Expression!.NodeType !=
ExpressionType
.Parameter)
Microsoft.AspNetCore.Mvc.ViewFeatures (18)
ExpressionHelper.cs (7)
51
case
ExpressionType
.Call:
72
case
ExpressionType
.ArrayIndex:
83
case
ExpressionType
.MemberAccess:
104
case
ExpressionType
.Parameter:
147
case
ExpressionType
.Call:
156
case
ExpressionType
.ArrayIndex:
165
case
ExpressionType
.MemberAccess:
ExpressionMetadataProvider.cs (5)
31
case
ExpressionType
.ArrayIndex:
37
case
ExpressionType
.Call:
42
case
ExpressionType
.MemberAccess:
48
memberExpression.Expression.NodeType ==
ExpressionType
.Constant)
65
case
ExpressionType
.Parameter:
LambdaExpressionComparer.cs (4)
44
case
ExpressionType
.MemberAccess:
66
case
ExpressionType
.ArrayIndex:
70
case
ExpressionType
.Call:
88
if (expression != null && expression.NodeType ==
ExpressionType
.MemberAccess)
ModelStateDictionaryExtensions.cs (2)
166
return expression?.NodeType ==
ExpressionType
.Convert &&
167
expression.Operand?.NodeType ==
ExpressionType
.MemberAccess &&
Microsoft.CodeAnalysis.CSharp (36)
Binder\Semantics\Operators\OperatorKindExtensions.cs (36)
336
public static
ExpressionType
ToExpressionType(this BinaryOperatorKind kind, bool isCompoundAssignment)
342
case BinaryOperatorKind.Multiplication: return
ExpressionType
.MultiplyAssign;
343
case BinaryOperatorKind.Addition: return
ExpressionType
.AddAssign;
344
case BinaryOperatorKind.Subtraction: return
ExpressionType
.SubtractAssign;
345
case BinaryOperatorKind.Division: return
ExpressionType
.DivideAssign;
346
case BinaryOperatorKind.Remainder: return
ExpressionType
.ModuloAssign;
347
case BinaryOperatorKind.LeftShift: return
ExpressionType
.LeftShiftAssign;
348
case BinaryOperatorKind.RightShift: return
ExpressionType
.RightShiftAssign;
349
case BinaryOperatorKind.And: return
ExpressionType
.AndAssign;
350
case BinaryOperatorKind.Xor: return
ExpressionType
.ExclusiveOrAssign;
351
case BinaryOperatorKind.Or: return
ExpressionType
.OrAssign;
358
case BinaryOperatorKind.Multiplication: return
ExpressionType
.Multiply;
359
case BinaryOperatorKind.Addition: return
ExpressionType
.Add;
360
case BinaryOperatorKind.Subtraction: return
ExpressionType
.Subtract;
361
case BinaryOperatorKind.Division: return
ExpressionType
.Divide;
362
case BinaryOperatorKind.Remainder: return
ExpressionType
.Modulo;
363
case BinaryOperatorKind.LeftShift: return
ExpressionType
.LeftShift;
364
case BinaryOperatorKind.RightShift: return
ExpressionType
.RightShift;
365
case BinaryOperatorKind.Equal: return
ExpressionType
.Equal;
366
case BinaryOperatorKind.NotEqual: return
ExpressionType
.NotEqual;
367
case BinaryOperatorKind.GreaterThan: return
ExpressionType
.GreaterThan;
368
case BinaryOperatorKind.LessThan: return
ExpressionType
.LessThan;
369
case BinaryOperatorKind.GreaterThanOrEqual: return
ExpressionType
.GreaterThanOrEqual;
370
case BinaryOperatorKind.LessThanOrEqual: return
ExpressionType
.LessThanOrEqual;
371
case BinaryOperatorKind.And: return
ExpressionType
.And;
372
case BinaryOperatorKind.Xor: return
ExpressionType
.ExclusiveOr;
373
case BinaryOperatorKind.Or: return
ExpressionType
.Or;
380
public static
ExpressionType
ToExpressionType(this UnaryOperatorKind kind)
386
return
ExpressionType
.Increment;
390
return
ExpressionType
.Decrement;
392
case UnaryOperatorKind.UnaryPlus: return
ExpressionType
.UnaryPlus;
393
case UnaryOperatorKind.UnaryMinus: return
ExpressionType
.Negate;
394
case UnaryOperatorKind.LogicalNegation: return
ExpressionType
.Not;
395
case UnaryOperatorKind.BitwiseComplement: return
ExpressionType
.OnesComplement;
396
case UnaryOperatorKind.True: return
ExpressionType
.IsTrue;
397
case UnaryOperatorKind.False: return
ExpressionType
.IsFalse;
Microsoft.CSharp (81)
Microsoft\CSharp\RuntimeBinder\Binder.cs (2)
33
ExpressionType
operation,
272
ExpressionType
operation,
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (37)
301
&& (operatorPayload.Operation ==
ExpressionType
.Increment || operatorPayload.Operation ==
ExpressionType
.Decrement);
373
internal static string GetCLROperatorName(this
ExpressionType
p) =>
378
ExpressionType
.Add => SpecialNames.CLR_Add,
379
ExpressionType
.Subtract => SpecialNames.CLR_Subtract,
380
ExpressionType
.Multiply => SpecialNames.CLR_Multiply,
381
ExpressionType
.Divide => SpecialNames.CLR_Division,
382
ExpressionType
.Modulo => SpecialNames.CLR_Modulus,
383
ExpressionType
.LeftShift => SpecialNames.CLR_LShift,
384
ExpressionType
.RightShift => SpecialNames.CLR_RShift,
385
ExpressionType
.LessThan => SpecialNames.CLR_LT,
386
ExpressionType
.GreaterThan => SpecialNames.CLR_GT,
387
ExpressionType
.LessThanOrEqual => SpecialNames.CLR_LTE,
388
ExpressionType
.GreaterThanOrEqual => SpecialNames.CLR_GTE,
389
ExpressionType
.Equal => SpecialNames.CLR_Equality,
390
ExpressionType
.NotEqual => SpecialNames.CLR_Inequality,
391
ExpressionType
.And => SpecialNames.CLR_BitwiseAnd,
392
ExpressionType
.ExclusiveOr => SpecialNames.CLR_ExclusiveOr,
393
ExpressionType
.Or => SpecialNames.CLR_BitwiseOr,
396
ExpressionType
.AddAssign => SpecialNames.CLR_InPlaceAdd,
397
ExpressionType
.SubtractAssign => SpecialNames.CLR_InPlaceSubtract,
398
ExpressionType
.MultiplyAssign => SpecialNames.CLR_InPlaceMultiply,
399
ExpressionType
.DivideAssign => SpecialNames.CLR_InPlaceDivide,
400
ExpressionType
.ModuloAssign => SpecialNames.CLR_InPlaceModulus,
401
ExpressionType
.AndAssign => SpecialNames.CLR_InPlaceBitwiseAnd,
402
ExpressionType
.ExclusiveOrAssign => SpecialNames.CLR_InPlaceExclusiveOr,
403
ExpressionType
.OrAssign => SpecialNames.CLR_InPlaceBitwiseOr,
404
ExpressionType
.LeftShiftAssign => SpecialNames.CLR_InPlaceLShift,
405
ExpressionType
.RightShiftAssign => SpecialNames.CLR_InPlaceRShift,
408
ExpressionType
.Negate => SpecialNames.CLR_UnaryNegation,
409
ExpressionType
.UnaryPlus => SpecialNames.CLR_UnaryPlus,
410
ExpressionType
.Not => SpecialNames.CLR_LogicalNot,
411
ExpressionType
.OnesComplement => SpecialNames.CLR_OnesComplement,
412
ExpressionType
.IsTrue => SpecialNames.CLR_True,
413
ExpressionType
.IsFalse => SpecialNames.CLR_False,
415
ExpressionType
.Increment => SpecialNames.CLR_Increment,
416
ExpressionType
.Decrement => SpecialNames.CLR_Decrement,
Microsoft\CSharp\RuntimeBinder\CSharpBinaryOperationBinder.cs (1)
72
ExpressionType
operation,
Microsoft\CSharp\RuntimeBinder\CSharpUnaryOperationBinder.cs (1)
61
ExpressionType
operation,
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (4)
118
ExpressionType
opKind,
136
public static object TryEvalUnaryOperators<T>(T obj,
ExpressionType
oper, Type accessibilityContext)
138
if (oper ==
ExpressionType
.IsTrue || oper ==
ExpressionType
.IsFalse)
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (36)
1004
private static OperatorKind GetOperatorKind(
ExpressionType
p)
1009
private static OperatorKind GetOperatorKind(
ExpressionType
p, bool bIsLogical)
1018
case
ExpressionType
.Add:
1020
case
ExpressionType
.Subtract:
1022
case
ExpressionType
.Multiply:
1024
case
ExpressionType
.Divide:
1026
case
ExpressionType
.Modulo:
1028
case
ExpressionType
.LeftShift:
1030
case
ExpressionType
.RightShift:
1032
case
ExpressionType
.LessThan:
1034
case
ExpressionType
.GreaterThan:
1036
case
ExpressionType
.LessThanOrEqual:
1038
case
ExpressionType
.GreaterThanOrEqual:
1040
case
ExpressionType
.Equal:
1042
case
ExpressionType
.NotEqual:
1044
case
ExpressionType
.And:
1046
case
ExpressionType
.ExclusiveOr:
1048
case
ExpressionType
.Or:
1052
case
ExpressionType
.AddAssign:
1054
case
ExpressionType
.SubtractAssign:
1056
case
ExpressionType
.MultiplyAssign:
1058
case
ExpressionType
.DivideAssign:
1060
case
ExpressionType
.ModuloAssign:
1062
case
ExpressionType
.AndAssign:
1064
case
ExpressionType
.ExclusiveOrAssign:
1066
case
ExpressionType
.OrAssign:
1068
case
ExpressionType
.LeftShiftAssign:
1070
case
ExpressionType
.RightShiftAssign:
1074
case
ExpressionType
.Negate:
1076
case
ExpressionType
.UnaryPlus:
1078
case
ExpressionType
.Not:
1080
case
ExpressionType
.OnesComplement:
1082
case
ExpressionType
.IsTrue:
1084
case
ExpressionType
.IsFalse:
1088
case
ExpressionType
.Increment:
1090
case
ExpressionType
.Decrement:
Microsoft.VisualBasic.Core (26)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (26)
269
Dim linqOp As
ExpressionType
? = IDOUtils.LinqOperator(op)
273
Dim linqOperator As
ExpressionType
= CType(linqOp,
ExpressionType
)
871
Public Sub New(ByVal op As UserDefinedOperator, ByVal linqOp As
ExpressionType
)
919
Public Sub New(ByVal op As UserDefinedOperator, ByVal linqOp As
ExpressionType
)
1158
Friend Shared Function LinqOperator(ByVal vbOperator As UserDefinedOperator) As
ExpressionType
?
1162
Return
ExpressionType
.Negate
1164
Return
ExpressionType
.Not
1166
Return
ExpressionType
.UnaryPlus
1168
Return
ExpressionType
.Add
1170
Return
ExpressionType
.Subtract
1172
Return
ExpressionType
.Multiply
1174
Return
ExpressionType
.Divide
1176
Return
ExpressionType
.Power
1178
Return
ExpressionType
.LeftShift
1180
Return
ExpressionType
.RightShift
1182
Return
ExpressionType
.Modulo
1184
Return
ExpressionType
.Or
1186
Return
ExpressionType
.ExclusiveOr
1188
Return
ExpressionType
.And
1190
Return
ExpressionType
.Equal
1192
Return
ExpressionType
.NotEqual
1194
Return
ExpressionType
.LessThan
1196
Return
ExpressionType
.LessThanOrEqual
1198
Return
ExpressionType
.GreaterThanOrEqual
1200
Return
ExpressionType
.GreaterThan
netstandard (1)
netstandard.cs (1)
998
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.
ExpressionType
))]
System.ComponentModel.Composition (3)
System\ComponentModel\Composition\ConstraintServices.cs (3)
97
return Expression.MakeBinary(
ExpressionType
.OrElse,
98
Expression.MakeBinary(
ExpressionType
.OrElse,
112
return Expression.MakeBinary(
ExpressionType
.AndAlso,
System.ComponentModel.Composition.Registration (4)
System\ComponentModel\Composition\Registration\PartBuilderOfT.cs (4)
50
if (expr.NodeType ==
ExpressionType
.MemberAccess)
105
if (expr.NodeType !=
ExpressionType
.New)
118
if (argument.NodeType ==
ExpressionType
.Call)
124
if (parameter.NodeType ==
ExpressionType
.Lambda)
System.Composition.Convention (5)
System\Composition\Convention\PartConventionBuilderOfT.cs (5)
38
if (expr.NodeType ==
ExpressionType
.Call)
109
if (expr.NodeType ==
ExpressionType
.MemberAccess)
168
if (expr.NodeType !=
ExpressionType
.New)
180
if (argument.NodeType ==
ExpressionType
.Call)
186
if (parameter.NodeType ==
ExpressionType
.Lambda)
System.Core (1)
System.Core.cs (1)
136
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.
ExpressionType
))]
System.Linq.Expressions (1527)
System\Dynamic\BinaryOperationBinder.cs (32)
20
protected BinaryOperationBinder(
ExpressionType
operation)
34
public
ExpressionType
Operation { get; }
79
internal static bool OperationIsValid(
ExpressionType
operation)
83
case
ExpressionType
.Add:
84
case
ExpressionType
.And:
85
case
ExpressionType
.Divide:
86
case
ExpressionType
.Equal:
87
case
ExpressionType
.ExclusiveOr:
88
case
ExpressionType
.GreaterThan:
89
case
ExpressionType
.GreaterThanOrEqual:
90
case
ExpressionType
.LeftShift:
91
case
ExpressionType
.LessThan:
92
case
ExpressionType
.LessThanOrEqual:
93
case
ExpressionType
.Modulo:
94
case
ExpressionType
.Multiply:
95
case
ExpressionType
.NotEqual:
96
case
ExpressionType
.Or:
97
case
ExpressionType
.Power:
98
case
ExpressionType
.RightShift:
99
case
ExpressionType
.Subtract:
100
case
ExpressionType
.AddAssign:
101
case
ExpressionType
.AndAssign:
102
case
ExpressionType
.DivideAssign:
103
case
ExpressionType
.ExclusiveOrAssign:
104
case
ExpressionType
.LeftShiftAssign:
105
case
ExpressionType
.ModuloAssign:
106
case
ExpressionType
.MultiplyAssign:
107
case
ExpressionType
.OrAssign:
108
case
ExpressionType
.PowerAssign:
109
case
ExpressionType
.RightShiftAssign:
110
case
ExpressionType
.SubtractAssign:
111
case
ExpressionType
.Extension:
System\Dynamic\DynamicMetaObjectBinder.cs (1)
123
if (body.NodeType !=
ExpressionType
.Goto)
System\Dynamic\UnaryOperationBinder.cs (14)
20
protected UnaryOperationBinder(
ExpressionType
operation)
35
case
ExpressionType
.IsFalse:
36
case
ExpressionType
.IsTrue:
47
public
ExpressionType
Operation { get; }
86
internal static bool OperationIsValid(
ExpressionType
operation)
90
case
ExpressionType
.Negate:
91
case
ExpressionType
.UnaryPlus:
92
case
ExpressionType
.Not:
93
case
ExpressionType
.Decrement:
94
case
ExpressionType
.Increment:
95
case
ExpressionType
.OnesComplement:
96
case
ExpressionType
.IsTrue:
97
case
ExpressionType
.IsFalse:
98
case
ExpressionType
.Extension:
System\Dynamic\Utils\ExpressionUtils.cs (19)
100
public static void ValidateArgumentTypes(MethodBase method,
ExpressionType
nodeKind, ref ReadOnlyCollection<Expression> arguments, string? methodParamName)
102
Debug.Assert(nodeKind ==
ExpressionType
.Invoke || nodeKind ==
ExpressionType
.Call || nodeKind ==
ExpressionType
.Dynamic || nodeKind ==
ExpressionType
.New);
134
public static void ValidateArgumentCount(MethodBase method,
ExpressionType
nodeKind, int count, ParameterInfo[] pis)
141
case
ExpressionType
.New:
143
case
ExpressionType
.Invoke:
145
case
ExpressionType
.Dynamic:
146
case
ExpressionType
.Call:
154
public static Expression ValidateOneArgument(MethodBase method,
ExpressionType
nodeKind, Expression arguments, ParameterInfo pi, string? methodParamName, string argumentParamName, int index = -1)
171
case
ExpressionType
.New:
173
case
ExpressionType
.Invoke:
175
case
ExpressionType
.Dynamic:
176
case
ExpressionType
.Call:
198
case
ExpressionType
.Index:
205
case
ExpressionType
.MemberAccess:
235
internal static ParameterInfo[] GetParametersForValidation(MethodBase method,
ExpressionType
nodeKind)
239
if (nodeKind ==
ExpressionType
.Dynamic)
System\Linq\Expressions\BinaryExpression.cs (342)
38
private static bool IsOpAssignment(
ExpressionType
op)
42
case
ExpressionType
.AddAssign:
43
case
ExpressionType
.SubtractAssign:
44
case
ExpressionType
.MultiplyAssign:
45
case
ExpressionType
.AddAssignChecked:
46
case
ExpressionType
.SubtractAssignChecked:
47
case
ExpressionType
.MultiplyAssignChecked:
48
case
ExpressionType
.DivideAssign:
49
case
ExpressionType
.ModuloAssign:
50
case
ExpressionType
.PowerAssign:
51
case
ExpressionType
.AndAssign:
52
case
ExpressionType
.OrAssign:
53
case
ExpressionType
.RightShiftAssign:
54
case
ExpressionType
.LeftShiftAssign:
55
case
ExpressionType
.ExclusiveOrAssign:
100
if (NodeType ==
ExpressionType
.Equal)
126
ExpressionType
.MemberAccess => ReduceMember(),
127
ExpressionType
.Index => ReduceIndex(),
135
private static
ExpressionType
GetBinaryOpFromAssignmentOp(
ExpressionType
op)
140
ExpressionType
.AddAssign =>
ExpressionType
.Add,
141
ExpressionType
.AddAssignChecked =>
ExpressionType
.AddChecked,
142
ExpressionType
.SubtractAssign =>
ExpressionType
.Subtract,
143
ExpressionType
.SubtractAssignChecked =>
ExpressionType
.SubtractChecked,
144
ExpressionType
.MultiplyAssign =>
ExpressionType
.Multiply,
145
ExpressionType
.MultiplyAssignChecked =>
ExpressionType
.MultiplyChecked,
146
ExpressionType
.DivideAssign =>
ExpressionType
.Divide,
147
ExpressionType
.ModuloAssign =>
ExpressionType
.Modulo,
148
ExpressionType
.PowerAssign =>
ExpressionType
.Power,
149
ExpressionType
.AndAssign =>
ExpressionType
.And,
150
ExpressionType
.OrAssign =>
ExpressionType
.Or,
151
ExpressionType
.RightShiftAssign =>
ExpressionType
.RightShift,
152
ExpressionType
.LeftShiftAssign =>
ExpressionType
.LeftShift,
153
ExpressionType
.ExclusiveOrAssign =>
ExpressionType
.ExclusiveOr,
163
ExpressionType
op = GetBinaryOpFromAssignmentOp(NodeType);
196
ExpressionType
op = GetBinaryOpFromAssignmentOp(NodeType);
255
ExpressionType
binaryOp = GetBinaryOpFromAssignmentOp(NodeType);
286
if (NodeType ==
ExpressionType
.Coalesce || NodeType ==
ExpressionType
.Assign)
313
internal static BinaryExpression Create(
ExpressionType
nodeType, Expression left, Expression right, Type type, MethodInfo? method, LambdaExpression? conversion)
315
Debug.Assert(nodeType !=
ExpressionType
.Assign);
318
Debug.Assert(method == null && TypeUtils.AreEquivalent(type, right.Type) && nodeType ==
ExpressionType
.Coalesce);
339
ExpressionType
kind = NodeType;
342
(kind ==
ExpressionType
.AndAlso || kind ==
ExpressionType
.OrElse) &&
357
ExpressionType
kind = NodeType;
359
return (kind ==
ExpressionType
.Equal || kind ==
ExpressionType
.NotEqual) &&
399
string opName = NodeType ==
ExpressionType
.AndAlso ? "op_False" : "op_True";
460
internal LogicalBinaryExpression(
ExpressionType
nodeType, Expression left, Expression right)
468
public sealed override
ExpressionType
NodeType { get; }
495
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Assign;
523
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Coalesce;
535
internal OpAssignMethodConversionBinaryExpression(
ExpressionType
nodeType, Expression left, Expression right, Type type, MethodInfo method, LambdaExpression conversion)
548
internal SimpleBinaryExpression(
ExpressionType
nodeType, Expression left, Expression right, Type type)
555
public sealed override
ExpressionType
NodeType { get; }
566
internal MethodBinaryExpression(
ExpressionType
nodeType, Expression left, Expression right, Type type, MethodInfo method)
584
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Assign"/>
602
private static BinaryExpression? GetUserDefinedBinaryOperator(
ExpressionType
binaryType, string name, Expression left, Expression right, bool liftToNull)
631
private static BinaryExpression GetMethodBasedBinaryOperator(
ExpressionType
binaryType, Expression left, Expression right, MethodInfo method, bool liftToNull)
662
private static BinaryExpression GetMethodBasedAssignOperator(
ExpressionType
binaryType, Expression left, Expression right, MethodInfo method, LambdaExpression? conversion, bool liftToNull)
682
private static BinaryExpression GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
binaryType, string name, Expression left, Expression right, bool liftToNull)
695
private static BinaryExpression GetUserDefinedAssignOperatorOrThrow(
ExpressionType
binaryType, string name, Expression left, Expression right, LambdaExpression? conversion, bool liftToNull)
717
private static MethodInfo? GetUserDefinedBinaryOperator(
ExpressionType
binaryType, Type leftType, Type rightType, string name)
737
private static bool IsLiftingConditionalLogicalOperator(Type left, Type right, MethodInfo? method,
ExpressionType
binaryType)
742
(binaryType ==
ExpressionType
.AndAlso || binaryType ==
ExpressionType
.OrElse);
753
private static void ValidateParamsWithOperandsOrThrow(Type paramType, Type operandType,
ExpressionType
exprType, string name)
799
private static void ValidateUserDefinedConditionalLogicOperator(
ExpressionType
nodeType, Type left, Type right, MethodInfo method)
843
private static void VerifyOpTrueFalse(
ExpressionType
nodeType, Type left, MethodInfo opTrue, string paramName)
870
public static BinaryExpression MakeBinary(
ExpressionType
binaryType, Expression left, Expression right)
884
public static BinaryExpression MakeBinary(
ExpressionType
binaryType, Expression left, Expression right, bool liftToNull, MethodInfo? method)
900
public static BinaryExpression MakeBinary(
ExpressionType
binaryType, Expression left, Expression right, bool liftToNull, MethodInfo? method, LambdaExpression? conversion) =>
903
ExpressionType
.Add => Add(left, right, method),
904
ExpressionType
.AddChecked => AddChecked(left, right, method),
905
ExpressionType
.Subtract => Subtract(left, right, method),
906
ExpressionType
.SubtractChecked => SubtractChecked(left, right, method),
907
ExpressionType
.Multiply => Multiply(left, right, method),
908
ExpressionType
.MultiplyChecked => MultiplyChecked(left, right, method),
909
ExpressionType
.Divide => Divide(left, right, method),
910
ExpressionType
.Modulo => Modulo(left, right, method),
911
ExpressionType
.Power => Power(left, right, method),
912
ExpressionType
.And => And(left, right, method),
913
ExpressionType
.AndAlso => AndAlso(left, right, method),
914
ExpressionType
.Or => Or(left, right, method),
915
ExpressionType
.OrElse => OrElse(left, right, method),
916
ExpressionType
.LessThan => LessThan(left, right, liftToNull, method),
917
ExpressionType
.LessThanOrEqual => LessThanOrEqual(left, right, liftToNull, method),
918
ExpressionType
.GreaterThan => GreaterThan(left, right, liftToNull, method),
919
ExpressionType
.GreaterThanOrEqual => GreaterThanOrEqual(left, right, liftToNull, method),
920
ExpressionType
.Equal => Equal(left, right, liftToNull, method),
921
ExpressionType
.NotEqual => NotEqual(left, right, liftToNull, method),
922
ExpressionType
.ExclusiveOr => ExclusiveOr(left, right, method),
923
ExpressionType
.Coalesce => Coalesce(left, right, conversion),
924
ExpressionType
.ArrayIndex => ArrayIndex(left, right),
925
ExpressionType
.RightShift => RightShift(left, right, method),
926
ExpressionType
.LeftShift => LeftShift(left, right, method),
927
ExpressionType
.Assign => Assign(left, right),
928
ExpressionType
.AddAssign => AddAssign(left, right, method, conversion),
929
ExpressionType
.AndAssign => AndAssign(left, right, method, conversion),
930
ExpressionType
.DivideAssign => DivideAssign(left, right, method, conversion),
931
ExpressionType
.ExclusiveOrAssign => ExclusiveOrAssign(left, right, method, conversion),
932
ExpressionType
.LeftShiftAssign => LeftShiftAssign(left, right, method, conversion),
933
ExpressionType
.ModuloAssign => ModuloAssign(left, right, method, conversion),
934
ExpressionType
.MultiplyAssign => MultiplyAssign(left, right, method, conversion),
935
ExpressionType
.OrAssign => OrAssign(left, right, method, conversion),
936
ExpressionType
.PowerAssign => PowerAssign(left, right, method, conversion),
937
ExpressionType
.RightShiftAssign => RightShiftAssign(left, right, method, conversion),
938
ExpressionType
.SubtractAssign => SubtractAssign(left, right, method, conversion),
939
ExpressionType
.AddAssignChecked => AddAssignChecked(left, right, method, conversion),
940
ExpressionType
.SubtractAssignChecked => SubtractAssignChecked(left, right, method, conversion),
941
ExpressionType
.MultiplyAssignChecked => MultiplyAssignChecked(left, right, method, conversion),
952
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Equal"/>
966
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Equal"/>
975
return GetEqualityComparisonOperator(
ExpressionType
.Equal, "op_Equality", left, right, liftToNull);
977
return GetMethodBasedBinaryOperator(
ExpressionType
.Equal, left, right, method, liftToNull);
985
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Equal"/>
994
return new LogicalBinaryExpression(
ExpressionType
.Equal, left, right);
1004
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.NotEqual"/>
1018
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.NotEqual"/>
1027
return GetEqualityComparisonOperator(
ExpressionType
.NotEqual, "op_Inequality", left, right, liftToNull);
1029
return GetMethodBasedBinaryOperator(
ExpressionType
.NotEqual, left, right, method, liftToNull);
1037
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.NotEqual"/>
1046
return new LogicalBinaryExpression(
ExpressionType
.NotEqual, left, right);
1051
private static BinaryExpression GetEqualityComparisonOperator(
ExpressionType
binaryType, string opName, Expression left, Expression right, bool liftToNull)
1097
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.GreaterThan"/>
1111
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.GreaterThan"/>
1120
return GetComparisonOperator(
ExpressionType
.GreaterThan, "op_GreaterThan", left, right, liftToNull);
1122
return GetMethodBasedBinaryOperator(
ExpressionType
.GreaterThan, left, right, method, liftToNull);
1130
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.LessThan"/>
1145
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.LessThan"/>
1154
return GetComparisonOperator(
ExpressionType
.LessThan, "op_LessThan", left, right, liftToNull);
1156
return GetMethodBasedBinaryOperator(
ExpressionType
.LessThan, left, right, method, liftToNull);
1164
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.GreaterThanOrEqual"/>
1178
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.GreaterThanOrEqual"/>
1187
return GetComparisonOperator(
ExpressionType
.GreaterThanOrEqual, "op_GreaterThanOrEqual", left, right, liftToNull);
1189
return GetMethodBasedBinaryOperator(
ExpressionType
.GreaterThanOrEqual, left, right, method, liftToNull);
1197
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.LessThanOrEqual"/>
1211
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.LessThanOrEqual"/>
1220
return GetComparisonOperator(
ExpressionType
.LessThanOrEqual, "op_LessThanOrEqual", left, right, liftToNull);
1222
return GetMethodBasedBinaryOperator(
ExpressionType
.LessThanOrEqual, left, right, method, liftToNull);
1225
private static BinaryExpression GetComparisonOperator(
ExpressionType
binaryType, string opName, Expression left, Expression right, bool liftToNull)
1250
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AndAlso"/>
1263
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AndAlso"/>
1277
return new LogicalBinaryExpression(
ExpressionType
.AndAlso, left, right);
1281
return new SimpleBinaryExpression(
ExpressionType
.AndAlso, left, right, left.Type);
1284
method = GetUserDefinedBinaryOperator(
ExpressionType
.AndAlso, left.Type, right.Type, "op_BitwiseAnd");
1287
ValidateUserDefinedConditionalLogicOperator(
ExpressionType
.AndAlso, left.Type, right.Type, method);
1289
return new MethodBinaryExpression(
ExpressionType
.AndAlso, left, right, returnType, method);
1291
throw Error.BinaryOperatorNotDefined(
ExpressionType
.AndAlso, left.Type, right.Type);
1293
ValidateUserDefinedConditionalLogicOperator(
ExpressionType
.AndAlso, left.Type, right.Type, method);
1295
return new MethodBinaryExpression(
ExpressionType
.AndAlso, left, right, returnType, method);
1303
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.OrElse"/>
1316
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.OrElse"/>
1330
return new LogicalBinaryExpression(
ExpressionType
.OrElse, left, right);
1334
return new SimpleBinaryExpression(
ExpressionType
.OrElse, left, right, left.Type);
1337
method = GetUserDefinedBinaryOperator(
ExpressionType
.OrElse, left.Type, right.Type, "op_BitwiseOr");
1340
ValidateUserDefinedConditionalLogicOperator(
ExpressionType
.OrElse, left.Type, right.Type, method);
1342
return new MethodBinaryExpression(
ExpressionType
.OrElse, left, right, returnType, method);
1344
throw Error.BinaryOperatorNotDefined(
ExpressionType
.OrElse, left.Type, right.Type);
1346
ValidateUserDefinedConditionalLogicOperator(
ExpressionType
.OrElse, left.Type, right.Type, method);
1348
return new MethodBinaryExpression(
ExpressionType
.OrElse, left, right, returnType, method);
1360
/// <returns>A <see cref="BinaryExpression" /> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Coalesce"/>
1373
/// <returns>A <see cref="BinaryExpression" /> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Coalesce"/>
1384
return new SimpleBinaryExpression(
ExpressionType
.Coalesce, left, right, resultType);
1411
throw Error.OperandTypesDoNotMatchParameters(
ExpressionType
.Coalesce, conversion.ToString());
1418
throw Error.OperandTypesDoNotMatchParameters(
ExpressionType
.Coalesce, conversion.ToString());
1457
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Add"/>
1470
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Add"/>
1481
return new SimpleBinaryExpression(
ExpressionType
.Add, left, right, left.Type);
1483
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.Add, "op_Addition", left, right, liftToNull: true);
1485
return GetMethodBasedBinaryOperator(
ExpressionType
.Add, left, right, method, liftToNull: true);
1493
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AddAssign"/>
1506
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AddAssign"/>
1521
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AddAssign"/>
1539
return new SimpleBinaryExpression(
ExpressionType
.AddAssign, left, right, left.Type);
1541
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.AddAssign, "op_Addition", left, right, conversion, liftToNull: true);
1543
return GetMethodBasedAssignOperator(
ExpressionType
.AddAssign, left, right, method, conversion, liftToNull: true);
1546
private static void ValidateOpAssignConversionLambda(LambdaExpression conversion, Expression left, MethodInfo method,
ExpressionType
nodeType)
1575
/// <see cref="
ExpressionType
.AddAssignChecked"/> and the <see cref="BinaryExpression.Left"/> and <see cref="BinaryExpression.Right"/>
1589
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AddAssignChecked"/>
1604
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AddAssignChecked"/>
1623
return new SimpleBinaryExpression(
ExpressionType
.AddAssignChecked, left, right, left.Type);
1625
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.AddAssignChecked, "op_Addition", left, right, conversion, liftToNull: true);
1627
return GetMethodBasedAssignOperator(
ExpressionType
.AddAssignChecked, left, right, method, conversion, liftToNull: true);
1635
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AddChecked"/>
1648
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AddChecked"/>
1659
return new SimpleBinaryExpression(
ExpressionType
.AddChecked, left, right, left.Type);
1661
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.AddChecked, "op_Addition", left, right, liftToNull: true);
1663
return GetMethodBasedBinaryOperator(
ExpressionType
.AddChecked, left, right, method, liftToNull: true);
1671
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Subtract"/>
1684
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Subtract"/>
1695
return new SimpleBinaryExpression(
ExpressionType
.Subtract, left, right, left.Type);
1697
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.Subtract, "op_Subtraction", left, right, liftToNull: true);
1699
return GetMethodBasedBinaryOperator(
ExpressionType
.Subtract, left, right, method, liftToNull: true);
1707
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.SubtractAssign"/>
1720
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.SubtractAssign"/>
1735
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.SubtractAssign"/>
1753
return new SimpleBinaryExpression(
ExpressionType
.SubtractAssign, left, right, left.Type);
1755
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.SubtractAssign, "op_Subtraction", left, right, conversion, liftToNull: true);
1757
return GetMethodBasedAssignOperator(
ExpressionType
.SubtractAssign, left, right, method, conversion, liftToNull: true);
1765
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.SubtractAssignChecked"/>
1778
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.SubtractAssignChecked"/>
1793
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.SubtractAssignChecked"/>
1811
return new SimpleBinaryExpression(
ExpressionType
.SubtractAssignChecked, left, right, left.Type);
1813
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.SubtractAssignChecked, "op_Subtraction", left, right, conversion, liftToNull: true);
1815
return GetMethodBasedAssignOperator(
ExpressionType
.SubtractAssignChecked, left, right, method, conversion, liftToNull: true);
1823
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.SubtractChecked"/>
1836
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.SubtractChecked"/>
1847
return new SimpleBinaryExpression(
ExpressionType
.SubtractChecked, left, right, left.Type);
1849
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.SubtractChecked, "op_Subtraction", left, right, liftToNull: true);
1851
return GetMethodBasedBinaryOperator(
ExpressionType
.SubtractChecked, left, right, method, liftToNull: true);
1859
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Divide"/>
1872
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Divide"/>
1883
return new SimpleBinaryExpression(
ExpressionType
.Divide, left, right, left.Type);
1885
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.Divide, "op_Division", left, right, liftToNull: true);
1887
return GetMethodBasedBinaryOperator(
ExpressionType
.Divide, left, right, method, liftToNull: true);
1895
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.DivideAssign"/>
1908
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.DivideAssign"/>
1923
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.DivideAssign"/>
1941
return new SimpleBinaryExpression(
ExpressionType
.DivideAssign, left, right, left.Type);
1943
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.DivideAssign, "op_Division", left, right, conversion, liftToNull: true);
1945
return GetMethodBasedAssignOperator(
ExpressionType
.DivideAssign, left, right, method, conversion, liftToNull: true);
1953
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Modulo"/>
1966
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Modulo"/>
1977
return new SimpleBinaryExpression(
ExpressionType
.Modulo, left, right, left.Type);
1979
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.Modulo, "op_Modulus", left, right, liftToNull: true);
1981
return GetMethodBasedBinaryOperator(
ExpressionType
.Modulo, left, right, method, liftToNull: true);
1989
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ModuloAssign"/>
2002
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ModuloAssign"/>
2017
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ModuloAssign"/>
2035
return new SimpleBinaryExpression(
ExpressionType
.ModuloAssign, left, right, left.Type);
2037
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.ModuloAssign, "op_Modulus", left, right, conversion, liftToNull: true);
2039
return GetMethodBasedAssignOperator(
ExpressionType
.ModuloAssign, left, right, method, conversion, liftToNull: true);
2047
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Multiply"/>
2060
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Multiply"/>
2071
return new SimpleBinaryExpression(
ExpressionType
.Multiply, left, right, left.Type);
2073
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.Multiply, "op_Multiply", left, right, liftToNull: true);
2075
return GetMethodBasedBinaryOperator(
ExpressionType
.Multiply, left, right, method, liftToNull: true);
2083
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.MultiplyAssign"/>
2096
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.MultiplyAssign"/>
2111
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.MultiplyAssign"/>
2129
return new SimpleBinaryExpression(
ExpressionType
.MultiplyAssign, left, right, left.Type);
2131
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.MultiplyAssign, "op_Multiply", left, right, conversion, liftToNull: true);
2133
return GetMethodBasedAssignOperator(
ExpressionType
.MultiplyAssign, left, right, method, conversion, liftToNull: true);
2141
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.MultiplyAssignChecked"/>
2154
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.MultiplyAssignChecked"/>
2169
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.MultiplyAssignChecked"/>
2187
return new SimpleBinaryExpression(
ExpressionType
.MultiplyAssignChecked, left, right, left.Type);
2189
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.MultiplyAssignChecked, "op_Multiply", left, right, conversion, liftToNull: true);
2191
return GetMethodBasedAssignOperator(
ExpressionType
.MultiplyAssignChecked, left, right, method, conversion, liftToNull: true);
2199
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.MultiplyChecked"/>
2212
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.MultiplyChecked"/>
2223
return new SimpleBinaryExpression(
ExpressionType
.MultiplyChecked, left, right, left.Type);
2225
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.MultiplyChecked, "op_Multiply", left, right, liftToNull: true);
2227
return GetMethodBasedBinaryOperator(
ExpressionType
.MultiplyChecked, left, right, method, liftToNull: true);
2251
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.LeftShift"/>
2264
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.LeftShift"/>
2276
return new SimpleBinaryExpression(
ExpressionType
.LeftShift, left, right, resultType);
2278
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.LeftShift, "op_LeftShift", left, right, liftToNull: true);
2280
return GetMethodBasedBinaryOperator(
ExpressionType
.LeftShift, left, right, method, liftToNull: true);
2288
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.LeftShiftAssign"/>
2301
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.LeftShiftAssign"/>
2316
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.LeftShiftAssign"/>
2335
return new SimpleBinaryExpression(
ExpressionType
.LeftShiftAssign, left, right, resultType);
2337
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.LeftShiftAssign, "op_LeftShift", left, right, conversion, liftToNull: true);
2339
return GetMethodBasedAssignOperator(
ExpressionType
.LeftShiftAssign, left, right, method, conversion, liftToNull: true);
2347
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.RightShift"/>
2360
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.RightShift"/>
2372
return new SimpleBinaryExpression(
ExpressionType
.RightShift, left, right, resultType);
2374
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.RightShift, "op_RightShift", left, right, liftToNull: true);
2376
return GetMethodBasedBinaryOperator(
ExpressionType
.RightShift, left, right, method, liftToNull: true);
2384
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.RightShiftAssign"/>
2397
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.RightShiftAssign"/>
2412
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.RightShiftAssign"/>
2431
return new SimpleBinaryExpression(
ExpressionType
.RightShiftAssign, left, right, resultType);
2433
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.RightShiftAssign, "op_RightShift", left, right, conversion, liftToNull: true);
2435
return GetMethodBasedAssignOperator(
ExpressionType
.RightShiftAssign, left, right, method, conversion, liftToNull: true);
2443
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.And"/>
2456
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.And"/>
2467
return new SimpleBinaryExpression(
ExpressionType
.And, left, right, left.Type);
2469
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.And, "op_BitwiseAnd", left, right, liftToNull: true);
2471
return GetMethodBasedBinaryOperator(
ExpressionType
.And, left, right, method, liftToNull: true);
2479
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AndAssign"/>
2492
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AndAssign"/>
2507
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.AndAssign"/>
2525
return new SimpleBinaryExpression(
ExpressionType
.AndAssign, left, right, left.Type);
2527
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.AndAssign, "op_BitwiseAnd", left, right, conversion, liftToNull: true);
2529
return GetMethodBasedAssignOperator(
ExpressionType
.AndAssign, left, right, method, conversion, liftToNull: true);
2537
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Or"/>
2550
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Or"/>
2561
return new SimpleBinaryExpression(
ExpressionType
.Or, left, right, left.Type);
2563
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.Or, "op_BitwiseOr", left, right, liftToNull: true);
2565
return GetMethodBasedBinaryOperator(
ExpressionType
.Or, left, right, method, liftToNull: true);
2573
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.OrAssign"/>
2586
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.OrAssign"/>
2601
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.OrAssign"/>
2619
return new SimpleBinaryExpression(
ExpressionType
.OrAssign, left, right, left.Type);
2621
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.OrAssign, "op_BitwiseOr", left, right, conversion, liftToNull: true);
2623
return GetMethodBasedAssignOperator(
ExpressionType
.OrAssign, left, right, method, conversion, liftToNull: true);
2631
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ExclusiveOr"/>
2644
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ExclusiveOr"/>
2655
return new SimpleBinaryExpression(
ExpressionType
.ExclusiveOr, left, right, left.Type);
2657
return GetUserDefinedBinaryOperatorOrThrow(
ExpressionType
.ExclusiveOr, "op_ExclusiveOr", left, right, liftToNull: true);
2659
return GetMethodBasedBinaryOperator(
ExpressionType
.ExclusiveOr, left, right, method, liftToNull: true);
2667
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ExclusiveOrAssign"/>
2680
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ExclusiveOrAssign"/>
2695
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ExclusiveOrAssign"/>
2713
return new SimpleBinaryExpression(
ExpressionType
.ExclusiveOrAssign, left, right, left.Type);
2715
return GetUserDefinedAssignOperatorOrThrow(
ExpressionType
.ExclusiveOrAssign, "op_ExclusiveOr", left, right, conversion, liftToNull: true);
2717
return GetMethodBasedAssignOperator(
ExpressionType
.ExclusiveOrAssign, left, right, method, conversion, liftToNull: true);
2725
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Power"/>
2738
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Power"/>
2757
BinaryExpression? b = GetUserDefinedBinaryOperator(
ExpressionType
.Power, name, left, right, liftToNull: true);
2761
b = GetUserDefinedBinaryOperator(
ExpressionType
.Power, name, left, right, liftToNull: true);
2764
throw Error.BinaryOperatorNotDefined(
ExpressionType
.Power, left.Type, right.Type);
2769
ValidateParamsWithOperandsOrThrow(pis[0].ParameterType, left.Type,
ExpressionType
.Power, name);
2770
ValidateParamsWithOperandsOrThrow(pis[1].ParameterType, right.Type,
ExpressionType
.Power, name);
2775
return GetMethodBasedBinaryOperator(
ExpressionType
.Power, left, right, method, liftToNull: true);
2783
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.PowerAssign"/>
2796
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.PowerAssign"/>
2811
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.PowerAssign"/>
2825
throw Error.BinaryOperatorNotDefined(
ExpressionType
.PowerAssign, left.Type, right.Type);
2828
return GetMethodBasedAssignOperator(
ExpressionType
.PowerAssign, left, right, method, conversion, liftToNull: true);
2840
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ArrayIndex"/>
2861
return new SimpleBinaryExpression(
ExpressionType
.ArrayIndex, array, index, arrayType.GetElementType()!);
System\Linq\Expressions\BlockExpression.cs (3)
50
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
51
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Block;
System\Linq\Expressions\Common\ConstantCheck.cs (2)
22
ExpressionType
.Constant => ((ConstantExpression)e).Value == null,
23
ExpressionType
.Default => e.Type.IsNullableOrReferenceType(),
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (10)
34
case
ExpressionType
.ArrayIndex:
38
case
ExpressionType
.Parameter:
42
case
ExpressionType
.MemberAccess:
46
case
ExpressionType
.Unbox:
50
case
ExpressionType
.Call:
54
case
ExpressionType
.Index:
68
Debug.Assert(node.NodeType ==
ExpressionType
.ArrayIndex && node.Method == null);
209
Debug.Assert(node.NodeType ==
ExpressionType
.Unbox);
241
case
ExpressionType
.MemberAccess:
244
case
ExpressionType
.Index:
System\Linq\Expressions\Compiler\LambdaCompiler.Binary.cs (71)
24
Debug.Assert(b.NodeType !=
ExpressionType
.AndAlso && b.NodeType !=
ExpressionType
.OrElse && b.NodeType !=
ExpressionType
.Coalesce);
36
if ((b.NodeType ==
ExpressionType
.Equal || b.NodeType ==
ExpressionType
.NotEqual) &&
69
private void EmitNullEquality(
ExpressionType
op, Expression e, bool isLiftedToNull)
72
Debug.Assert(op ==
ExpressionType
.Equal || op ==
ExpressionType
.NotEqual);
84
if (op ==
ExpressionType
.Equal)
108
Debug.Assert(b.NodeType ==
ExpressionType
.Equal
109
|| b.NodeType ==
ExpressionType
.NotEqual
110
|| b.NodeType ==
ExpressionType
.LessThan
111
|| b.NodeType ==
ExpressionType
.LessThanOrEqual
112
|| b.NodeType ==
ExpressionType
.GreaterThan
113
|| b.NodeType ==
ExpressionType
.GreaterThanOrEqual);
129
private void EmitBinaryOperator(
ExpressionType
op, Type leftType, Type rightType, Type resultType, bool liftedToNull)
131
Debug.Assert(op !=
ExpressionType
.Coalesce);
132
if (op ==
ExpressionType
.ArrayIndex)
148
private void EmitUnliftedBinaryOp(
ExpressionType
op, Type leftType, Type rightType)
152
Debug.Assert(leftType.IsPrimitive || (op ==
ExpressionType
.Equal || op ==
ExpressionType
.NotEqual) && (!leftType.IsValueType || leftType.IsEnum));
156
case
ExpressionType
.NotEqual:
159
goto case
ExpressionType
.ExclusiveOr;
164
goto case
ExpressionType
.Equal;
165
case
ExpressionType
.Equal:
168
case
ExpressionType
.Add:
171
case
ExpressionType
.AddChecked:
174
case
ExpressionType
.Subtract:
177
case
ExpressionType
.SubtractChecked:
189
case
ExpressionType
.Multiply:
192
case
ExpressionType
.MultiplyChecked:
195
case
ExpressionType
.Divide:
198
case
ExpressionType
.Modulo:
202
case
ExpressionType
.And:
203
case
ExpressionType
.AndAlso:
207
case
ExpressionType
.Or:
208
case
ExpressionType
.OrElse:
212
case
ExpressionType
.LessThan:
216
case
ExpressionType
.LessThanOrEqual:
222
case
ExpressionType
.GreaterThan:
226
case
ExpressionType
.GreaterThanOrEqual:
232
case
ExpressionType
.ExclusiveOr:
236
case
ExpressionType
.LeftShift:
241
case
ExpressionType
.RightShift:
266
private void EmitConvertArithmeticResult(
ExpressionType
op, Type resultType)
287
private void EmitLiftedBinaryOp(
ExpressionType
op, Type leftType, Type rightType, Type resultType, bool liftedToNull)
292
case
ExpressionType
.And:
302
case
ExpressionType
.Or:
312
case
ExpressionType
.ExclusiveOr:
313
case
ExpressionType
.Add:
314
case
ExpressionType
.AddChecked:
315
case
ExpressionType
.Subtract:
316
case
ExpressionType
.SubtractChecked:
317
case
ExpressionType
.Multiply:
318
case
ExpressionType
.MultiplyChecked:
319
case
ExpressionType
.Divide:
320
case
ExpressionType
.Modulo:
321
case
ExpressionType
.LeftShift:
322
case
ExpressionType
.RightShift:
325
case
ExpressionType
.LessThan:
326
case
ExpressionType
.LessThanOrEqual:
327
case
ExpressionType
.GreaterThan:
328
case
ExpressionType
.GreaterThanOrEqual:
329
case
ExpressionType
.Equal:
330
case
ExpressionType
.NotEqual:
346
private void EmitLiftedRelational(
ExpressionType
op, Type type)
352
bool invert = op ==
ExpressionType
.NotEqual;
355
op =
ExpressionType
.Equal;
375
_ilg.Emit(op ==
ExpressionType
.Equal ? OpCodes.Ceq : OpCodes.And);
384
private void EmitLiftedToNullRelational(
ExpressionType
op, Type type)
417
private void EmitLiftedBinaryArithmetic(
ExpressionType
op, Type leftType, Type rightType, Type resultType)
System\Linq\Expressions\Compiler\LambdaCompiler.ControlFlow.cs (9)
156
case
ExpressionType
.Label:
175
case
ExpressionType
.Block:
190
case
ExpressionType
.Switch:
204
case
ExpressionType
.Convert:
213
case
ExpressionType
.Conditional:
214
case
ExpressionType
.Loop:
215
case
ExpressionType
.Goto:
254
case
ExpressionType
.Label:
260
case
ExpressionType
.Block:
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (26)
91
case
ExpressionType
.Assign:
94
case
ExpressionType
.Block:
97
case
ExpressionType
.Throw:
100
case
ExpressionType
.Goto:
103
case
ExpressionType
.Constant:
104
case
ExpressionType
.Default:
105
case
ExpressionType
.Parameter:
649
if (node.NodeType ==
ExpressionType
.TypeEqual)
749
case
ExpressionType
.Index:
752
case
ExpressionType
.MemberAccess:
755
case
ExpressionType
.Parameter:
881
Debug.Assert(instance.NodeType ==
ExpressionType
.Parameter);
903
if (node.NodeType ==
ExpressionType
.NewArrayInit)
1112
private void EmitLift(
ExpressionType
nodeType, Type resultType, MethodCallExpression mc, ParameterExpression[] paramList, Expression[] argList)
1119
case
ExpressionType
.LessThan:
1120
case
ExpressionType
.LessThanOrEqual:
1121
case
ExpressionType
.GreaterThan:
1122
case
ExpressionType
.GreaterThanOrEqual:
1186
Debug.Assert(nodeType ==
ExpressionType
.LessThan
1187
|| nodeType ==
ExpressionType
.LessThanOrEqual
1188
|| nodeType ==
ExpressionType
.GreaterThan
1189
|| nodeType ==
ExpressionType
.GreaterThanOrEqual);
1197
case
ExpressionType
.Equal:
1198
case
ExpressionType
.NotEqual:
1274
_ilg.EmitPrimitive(nodeType ==
ExpressionType
.Equal);
1278
_ilg.EmitPrimitive(nodeType ==
ExpressionType
.NotEqual);
System\Linq\Expressions\Compiler\LambdaCompiler.Generated.cs (75)
34
case
ExpressionType
.Add:
35
case
ExpressionType
.AddChecked:
36
case
ExpressionType
.And:
37
case
ExpressionType
.ArrayIndex:
38
case
ExpressionType
.Divide:
39
case
ExpressionType
.Equal:
40
case
ExpressionType
.ExclusiveOr:
41
case
ExpressionType
.GreaterThan:
42
case
ExpressionType
.GreaterThanOrEqual:
43
case
ExpressionType
.LeftShift:
44
case
ExpressionType
.LessThan:
45
case
ExpressionType
.LessThanOrEqual:
46
case
ExpressionType
.Modulo:
47
case
ExpressionType
.Multiply:
48
case
ExpressionType
.MultiplyChecked:
49
case
ExpressionType
.NotEqual:
50
case
ExpressionType
.Or:
51
case
ExpressionType
.Power:
52
case
ExpressionType
.RightShift:
53
case
ExpressionType
.Subtract:
54
case
ExpressionType
.SubtractChecked:
57
case
ExpressionType
.AndAlso:
60
case
ExpressionType
.OrElse:
63
case
ExpressionType
.Coalesce:
66
case
ExpressionType
.Assign:
69
case
ExpressionType
.ArrayLength:
70
case
ExpressionType
.Decrement:
71
case
ExpressionType
.Increment:
72
case
ExpressionType
.IsFalse:
73
case
ExpressionType
.IsTrue:
74
case
ExpressionType
.Negate:
75
case
ExpressionType
.NegateChecked:
76
case
ExpressionType
.Not:
77
case
ExpressionType
.OnesComplement:
78
case
ExpressionType
.TypeAs:
79
case
ExpressionType
.UnaryPlus:
82
case
ExpressionType
.Convert:
83
case
ExpressionType
.ConvertChecked:
86
case
ExpressionType
.Quote:
89
case
ExpressionType
.Throw:
92
case
ExpressionType
.Unbox:
95
case
ExpressionType
.Call:
98
case
ExpressionType
.Conditional:
101
case
ExpressionType
.Constant:
104
case
ExpressionType
.Invoke:
107
case
ExpressionType
.Lambda:
110
case
ExpressionType
.ListInit:
113
case
ExpressionType
.MemberAccess:
116
case
ExpressionType
.MemberInit:
119
case
ExpressionType
.New:
122
case
ExpressionType
.NewArrayInit:
123
case
ExpressionType
.NewArrayBounds:
126
case
ExpressionType
.Parameter:
129
case
ExpressionType
.TypeEqual:
130
case
ExpressionType
.TypeIs:
133
case
ExpressionType
.Block:
136
case
ExpressionType
.DebugInfo:
139
case
ExpressionType
.Dynamic:
142
case
ExpressionType
.Default:
145
case
ExpressionType
.Goto:
148
case
ExpressionType
.Index:
151
case
ExpressionType
.Label:
154
case
ExpressionType
.RuntimeVariables:
157
case
ExpressionType
.Loop:
160
case
ExpressionType
.Switch:
163
case
ExpressionType
.Try:
174
private static bool IsChecked(
ExpressionType
op)
178
case
ExpressionType
.AddChecked:
179
case
ExpressionType
.ConvertChecked:
180
case
ExpressionType
.MultiplyChecked:
181
case
ExpressionType
.NegateChecked:
182
case
ExpressionType
.SubtractChecked:
183
case
ExpressionType
.AddAssignChecked:
184
case
ExpressionType
.MultiplyAssignChecked:
185
case
ExpressionType
.SubtractAssignChecked:
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (13)
462
case
ExpressionType
.Not:
466
case
ExpressionType
.AndAlso:
467
case
ExpressionType
.OrElse:
471
case
ExpressionType
.Block:
475
case
ExpressionType
.Equal:
476
case
ExpressionType
.NotEqual:
508
Debug.Assert(node.NodeType ==
ExpressionType
.Equal || node.NodeType ==
ExpressionType
.NotEqual);
512
bool branchWhenEqual = branch == (node.NodeType ==
ExpressionType
.Equal);
570
if (expression.NodeType ==
ExpressionType
.Convert)
583
Debug.Assert(node.NodeType ==
ExpressionType
.AndAlso || node.NodeType ==
ExpressionType
.OrElse);
594
bool isAnd = node.NodeType ==
ExpressionType
.AndAlso;
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (19)
72
else if (node.NodeType ==
ExpressionType
.NegateChecked && node.Operand.Type.IsInteger())
94
EmitBinaryOperator(
ExpressionType
.SubtractChecked, nnType, nnType, nnType, liftedToNull: false);
110
EmitBinaryOperator(
ExpressionType
.SubtractChecked, type, type, type, liftedToNull: false);
120
private void EmitUnaryOperator(
ExpressionType
op, Type operandType, Type resultType)
124
if (op ==
ExpressionType
.ArrayLength)
134
case
ExpressionType
.UnaryPlus:
136
case
ExpressionType
.TypeAs:
183
case
ExpressionType
.Not:
191
goto case
ExpressionType
.OnesComplement;
192
case
ExpressionType
.OnesComplement:
200
case
ExpressionType
.IsFalse:
205
case
ExpressionType
.IsTrue:
210
case
ExpressionType
.UnaryPlus:
213
case
ExpressionType
.Negate:
214
case
ExpressionType
.NegateChecked:
219
case
ExpressionType
.TypeAs:
236
case
ExpressionType
.Increment:
240
case
ExpressionType
.Decrement:
344
_ilg.EmitConvertToType(node.Operand.Type, node.Type, node.NodeType ==
ExpressionType
.ConvertChecked, this);
System\Linq\Expressions\Compiler\StackSpiller.ChildRewriter.cs (4)
257
case
ExpressionType
.Constant:
258
case
ExpressionType
.Default:
262
case
ExpressionType
.RuntimeVariables:
265
case
ExpressionType
.MemberAccess:
System\Linq\Expressions\Compiler\StackSpiller.cs (9)
139
Debug.Assert(result.Node.NodeType !=
ExpressionType
.Extension, "extension nodes must be rewritten");
299
ExpressionType
.Index => RewriteIndexAssignment(node, stack),
300
ExpressionType
.MemberAccess => RewriteMemberAssignment(node, stack),
301
ExpressionType
.Parameter => RewriteVariableAssignment(node, stack),
302
ExpressionType
.Extension => RewriteExtensionAssignment(node, stack),
471
if (node.NodeType ==
ExpressionType
.NewArrayInit)
595
expr = new UnaryExpression(
ExpressionType
.Throw, value.Node, node.Type, null);
605
Debug.Assert(node.NodeType !=
ExpressionType
.Quote, "unexpected Quote");
606
Debug.Assert(node.NodeType !=
ExpressionType
.Throw, "unexpected Throw");
System\Linq\Expressions\Compiler\StackSpiller.Generated.cs (85)
34
case
ExpressionType
.Add:
35
case
ExpressionType
.AddChecked:
36
case
ExpressionType
.And:
37
case
ExpressionType
.ArrayIndex:
38
case
ExpressionType
.Divide:
39
case
ExpressionType
.Equal:
40
case
ExpressionType
.ExclusiveOr:
41
case
ExpressionType
.GreaterThan:
42
case
ExpressionType
.GreaterThanOrEqual:
43
case
ExpressionType
.LeftShift:
44
case
ExpressionType
.LessThan:
45
case
ExpressionType
.LessThanOrEqual:
46
case
ExpressionType
.Modulo:
47
case
ExpressionType
.Multiply:
48
case
ExpressionType
.MultiplyChecked:
49
case
ExpressionType
.NotEqual:
50
case
ExpressionType
.Or:
51
case
ExpressionType
.Power:
52
case
ExpressionType
.RightShift:
53
case
ExpressionType
.Subtract:
54
case
ExpressionType
.SubtractChecked:
57
case
ExpressionType
.AndAlso:
58
case
ExpressionType
.Coalesce:
59
case
ExpressionType
.OrElse:
62
case
ExpressionType
.Assign:
65
case
ExpressionType
.ArrayLength:
66
case
ExpressionType
.Convert:
67
case
ExpressionType
.ConvertChecked:
68
case
ExpressionType
.Decrement:
69
case
ExpressionType
.Increment:
70
case
ExpressionType
.IsFalse:
71
case
ExpressionType
.IsTrue:
72
case
ExpressionType
.Negate:
73
case
ExpressionType
.NegateChecked:
74
case
ExpressionType
.Not:
75
case
ExpressionType
.OnesComplement:
76
case
ExpressionType
.TypeAs:
77
case
ExpressionType
.UnaryPlus:
78
case
ExpressionType
.Unbox:
81
case
ExpressionType
.Throw:
84
case
ExpressionType
.Call:
87
case
ExpressionType
.Conditional:
90
case
ExpressionType
.Invoke:
93
case
ExpressionType
.Lambda:
96
case
ExpressionType
.ListInit:
99
case
ExpressionType
.MemberAccess:
102
case
ExpressionType
.MemberInit:
105
case
ExpressionType
.New:
108
case
ExpressionType
.NewArrayInit:
109
case
ExpressionType
.NewArrayBounds:
112
case
ExpressionType
.TypeEqual:
113
case
ExpressionType
.TypeIs:
116
case
ExpressionType
.Block:
119
case
ExpressionType
.Dynamic:
122
case
ExpressionType
.Extension:
125
case
ExpressionType
.Goto:
128
case
ExpressionType
.Index:
131
case
ExpressionType
.Label:
134
case
ExpressionType
.Loop:
137
case
ExpressionType
.Switch:
140
case
ExpressionType
.Try:
143
case
ExpressionType
.AddAssign:
144
case
ExpressionType
.AndAssign:
145
case
ExpressionType
.DivideAssign:
146
case
ExpressionType
.ExclusiveOrAssign:
147
case
ExpressionType
.LeftShiftAssign:
148
case
ExpressionType
.ModuloAssign:
149
case
ExpressionType
.MultiplyAssign:
150
case
ExpressionType
.OrAssign:
151
case
ExpressionType
.PowerAssign:
152
case
ExpressionType
.RightShiftAssign:
153
case
ExpressionType
.SubtractAssign:
154
case
ExpressionType
.AddAssignChecked:
155
case
ExpressionType
.MultiplyAssignChecked:
156
case
ExpressionType
.SubtractAssignChecked:
157
case
ExpressionType
.PreIncrementAssign:
158
case
ExpressionType
.PreDecrementAssign:
159
case
ExpressionType
.PostIncrementAssign:
160
case
ExpressionType
.PostDecrementAssign:
163
case
ExpressionType
.Quote:
164
case
ExpressionType
.Parameter:
165
case
ExpressionType
.Constant:
166
case
ExpressionType
.RuntimeVariables:
167
case
ExpressionType
.Default:
168
case
ExpressionType
.DebugInfo:
System\Linq\Expressions\Compiler\VariableBinder.cs (2)
71
if (node.NodeType ==
ExpressionType
.Quote)
165
while (body.Count == 1 && body[0].NodeType ==
ExpressionType
.Block)
System\Linq\Expressions\ConditionalExpression.cs (7)
42
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
43
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Conditional;
132
/// <see cref="
ExpressionType
.Conditional"/> and the <see cref="ConditionalExpression.Test"/>, <see cref="ConditionalExpression.IfTrue"/>,
160
/// <see cref="
ExpressionType
.Conditional"/> and the <see cref="ConditionalExpression.Test"/>, <see cref="ConditionalExpression.IfTrue"/>,
195
/// <see cref="
ExpressionType
.Conditional"/> and the <see cref="ConditionalExpression.Test"/>, <see cref="ConditionalExpression.IfTrue"/>,
210
/// <see cref="
ExpressionType
.Conditional"/> and the <see cref="ConditionalExpression.Test"/>, <see cref="ConditionalExpression.IfTrue"/>,
System\Linq\Expressions\ConstantExpression.cs (5)
41
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
42
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Constant;
77
/// <see cref="
ExpressionType
.Constant"/> and the <see cref="ConstantExpression.Value"/> property set to the specified value.
92
/// <see cref="
ExpressionType
.Constant"/> and the <see cref="ConstantExpression.Value"/> and
System\Linq\Expressions\DebugInfoExpression.cs (3)
33
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
34
public sealed override
ExpressionType
NodeType =>
ExpressionType
.DebugInfo;
System\Linq\Expressions\DebugViewWriter.cs (145)
294
if (node.NodeType ==
ExpressionType
.ArrayIndex)
310
case
ExpressionType
.Assign: op = "="; break;
311
case
ExpressionType
.Equal: op = "=="; break;
312
case
ExpressionType
.NotEqual: op = "!="; break;
313
case
ExpressionType
.AndAlso: op = "&&"; beforeOp = Flow.Break | Flow.Space; break;
314
case
ExpressionType
.OrElse: op = "||"; beforeOp = Flow.Break | Flow.Space; break;
315
case
ExpressionType
.GreaterThan: op = ">"; break;
316
case
ExpressionType
.LessThan: op = "<"; break;
317
case
ExpressionType
.GreaterThanOrEqual: op = ">="; break;
318
case
ExpressionType
.LessThanOrEqual: op = "<="; break;
319
case
ExpressionType
.Add: op = "+"; break;
320
case
ExpressionType
.AddAssign: op = "+="; break;
321
case
ExpressionType
.AddAssignChecked: op = "#+="; break;
322
case
ExpressionType
.AddChecked: op = "#+"; break;
323
case
ExpressionType
.Subtract: op = "-"; break;
324
case
ExpressionType
.SubtractAssign: op = "-="; break;
325
case
ExpressionType
.SubtractAssignChecked: op = "#-="; break;
326
case
ExpressionType
.SubtractChecked: op = "#-"; break;
327
case
ExpressionType
.Divide: op = "/"; break;
328
case
ExpressionType
.DivideAssign: op = "/="; break;
329
case
ExpressionType
.Modulo: op = "%"; break;
330
case
ExpressionType
.ModuloAssign: op = "%="; break;
331
case
ExpressionType
.Multiply: op = "*"; break;
332
case
ExpressionType
.MultiplyAssign: op = "*="; break;
333
case
ExpressionType
.MultiplyAssignChecked: op = "#*="; break;
334
case
ExpressionType
.MultiplyChecked: op = "#*"; break;
335
case
ExpressionType
.LeftShift: op = "<<"; break;
336
case
ExpressionType
.LeftShiftAssign: op = "<<="; break;
337
case
ExpressionType
.RightShift: op = ">>"; break;
338
case
ExpressionType
.RightShiftAssign: op = ">>="; break;
339
case
ExpressionType
.And: op = "&"; break;
340
case
ExpressionType
.AndAssign: op = "&="; break;
341
case
ExpressionType
.Or: op = "|"; break;
342
case
ExpressionType
.OrAssign: op = "|="; break;
343
case
ExpressionType
.ExclusiveOr: op = "^"; break;
344
case
ExpressionType
.ExclusiveOrAssign: op = "^="; break;
345
case
ExpressionType
.Power: op = "**"; break;
346
case
ExpressionType
.PowerAssign: op = "**="; break;
347
case
ExpressionType
.Coalesce: op = "??"; break;
565
case
ExpressionType
.Increment:
566
case
ExpressionType
.Decrement:
567
case
ExpressionType
.IsTrue:
568
case
ExpressionType
.IsFalse:
569
case
ExpressionType
.Unbox:
591
case
ExpressionType
.AndAlso:
592
case
ExpressionType
.OrElse:
593
case
ExpressionType
.And:
594
case
ExpressionType
.Or:
595
case
ExpressionType
.ExclusiveOr:
601
case
ExpressionType
.Add:
602
case
ExpressionType
.AddChecked:
603
case
ExpressionType
.Multiply:
604
case
ExpressionType
.MultiplyChecked:
606
case
ExpressionType
.Subtract:
607
case
ExpressionType
.SubtractChecked:
608
case
ExpressionType
.Divide:
609
case
ExpressionType
.Modulo:
620
if (child != null && child.NodeType ==
ExpressionType
.Constant &&
621
(parent.NodeType ==
ExpressionType
.Negate || parent.NodeType ==
ExpressionType
.NegateChecked))
639
case
ExpressionType
.Assign:
640
case
ExpressionType
.ExclusiveOrAssign:
641
case
ExpressionType
.AddAssign:
642
case
ExpressionType
.AddAssignChecked:
643
case
ExpressionType
.SubtractAssign:
644
case
ExpressionType
.SubtractAssignChecked:
645
case
ExpressionType
.DivideAssign:
646
case
ExpressionType
.ModuloAssign:
647
case
ExpressionType
.MultiplyAssign:
648
case
ExpressionType
.MultiplyAssignChecked:
649
case
ExpressionType
.LeftShiftAssign:
650
case
ExpressionType
.RightShiftAssign:
651
case
ExpressionType
.AndAssign:
652
case
ExpressionType
.OrAssign:
653
case
ExpressionType
.PowerAssign:
654
case
ExpressionType
.Coalesce:
660
case
ExpressionType
.OrElse:
664
case
ExpressionType
.AndAlso:
668
case
ExpressionType
.Or:
672
case
ExpressionType
.ExclusiveOr:
676
case
ExpressionType
.And:
680
case
ExpressionType
.Equal:
681
case
ExpressionType
.NotEqual:
685
case
ExpressionType
.GreaterThan:
686
case
ExpressionType
.LessThan:
687
case
ExpressionType
.GreaterThanOrEqual:
688
case
ExpressionType
.LessThanOrEqual:
689
case
ExpressionType
.TypeAs:
690
case
ExpressionType
.TypeIs:
691
case
ExpressionType
.TypeEqual:
695
case
ExpressionType
.LeftShift:
696
case
ExpressionType
.RightShift:
700
case
ExpressionType
.Add:
701
case
ExpressionType
.AddChecked:
702
case
ExpressionType
.Subtract:
703
case
ExpressionType
.SubtractChecked:
707
case
ExpressionType
.Divide:
708
case
ExpressionType
.Modulo:
709
case
ExpressionType
.Multiply:
710
case
ExpressionType
.MultiplyChecked:
714
case
ExpressionType
.Negate:
715
case
ExpressionType
.NegateChecked:
716
case
ExpressionType
.UnaryPlus:
717
case
ExpressionType
.Not:
718
case
ExpressionType
.Convert:
719
case
ExpressionType
.ConvertChecked:
720
case
ExpressionType
.PreIncrementAssign:
721
case
ExpressionType
.PreDecrementAssign:
722
case
ExpressionType
.OnesComplement:
723
case
ExpressionType
.Increment:
724
case
ExpressionType
.Decrement:
725
case
ExpressionType
.IsTrue:
726
case
ExpressionType
.IsFalse:
727
case
ExpressionType
.Unbox:
728
case
ExpressionType
.Throw:
733
case
ExpressionType
.Power:
738
case
ExpressionType
.PostIncrementAssign:
739
case
ExpressionType
.PostDecrementAssign:
745
case
ExpressionType
.Constant:
746
case
ExpressionType
.Parameter:
788
if (node.NodeType ==
ExpressionType
.NewArrayBounds)
866
case
ExpressionType
.TypeIs:
869
case
ExpressionType
.TypeEqual:
881
case
ExpressionType
.Convert:
884
case
ExpressionType
.ConvertChecked:
887
case
ExpressionType
.TypeAs:
889
case
ExpressionType
.Not:
892
case
ExpressionType
.OnesComplement:
895
case
ExpressionType
.Negate:
898
case
ExpressionType
.NegateChecked:
901
case
ExpressionType
.UnaryPlus:
904
case
ExpressionType
.ArrayLength:
906
case
ExpressionType
.Quote:
909
case
ExpressionType
.Throw:
919
case
ExpressionType
.IsFalse:
922
case
ExpressionType
.IsTrue:
925
case
ExpressionType
.Decrement:
928
case
ExpressionType
.Increment:
931
case
ExpressionType
.PreDecrementAssign:
934
case
ExpressionType
.PreIncrementAssign:
937
case
ExpressionType
.Unbox:
946
case
ExpressionType
.TypeAs:
951
case
ExpressionType
.ArrayLength:
955
case
ExpressionType
.PostDecrementAssign:
959
case
ExpressionType
.PostIncrementAssign:
System\Linq\Expressions\DefaultExpression.cs (5)
30
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
31
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Default;
49
/// <see cref="
ExpressionType
.Default"/> and the <see cref="Type"/> property set to <see cref="Void"/>.
62
/// <see cref="
ExpressionType
.Default"/> and the <see cref="Type"/> property set to the specified type.
System\Linq\Expressions\DynamicExpression.cs (42)
121
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
122
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Dynamic;
235
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
257
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
279
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
302
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
326
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
351
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
373
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
392
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
410
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
429
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
449
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
470
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
828
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
846
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
873
ExpressionUtils.ValidateArgumentTypes(method,
ExpressionType
.Dynamic, ref args, nameof(delegateType));
886
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
900
ExpressionUtils.ValidateArgumentCount(method,
ExpressionType
.Dynamic, 2, parameters);
902
ExpressionUtils.ValidateOneArgument(method,
ExpressionType
.Dynamic, arg0, parameters[1], nameof(delegateType), nameof(arg0));
916
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
930
ExpressionUtils.ValidateArgumentCount(method,
ExpressionType
.Dynamic, 3, parameters);
932
ExpressionUtils.ValidateOneArgument(method,
ExpressionType
.Dynamic, arg0, parameters[1], nameof(delegateType), nameof(arg0));
934
ExpressionUtils.ValidateOneArgument(method,
ExpressionType
.Dynamic, arg1, parameters[2], nameof(delegateType), nameof(arg1));
949
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
963
ExpressionUtils.ValidateArgumentCount(method,
ExpressionType
.Dynamic, 4, parameters);
965
ExpressionUtils.ValidateOneArgument(method,
ExpressionType
.Dynamic, arg0, parameters[1], nameof(delegateType), nameof(arg0));
967
ExpressionUtils.ValidateOneArgument(method,
ExpressionType
.Dynamic, arg1, parameters[2], nameof(delegateType), nameof(arg1));
969
ExpressionUtils.ValidateOneArgument(method,
ExpressionType
.Dynamic, arg2, parameters[3], nameof(delegateType), nameof(arg2));
985
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
999
ExpressionUtils.ValidateArgumentCount(method,
ExpressionType
.Dynamic, 5, parameters);
1001
ExpressionUtils.ValidateOneArgument(method,
ExpressionType
.Dynamic, arg0, parameters[1], nameof(delegateType), nameof(arg0));
1003
ExpressionUtils.ValidateOneArgument(method,
ExpressionType
.Dynamic, arg1, parameters[2], nameof(delegateType), nameof(arg1));
1005
ExpressionUtils.ValidateOneArgument(method,
ExpressionType
.Dynamic, arg2, parameters[3], nameof(delegateType), nameof(arg2));
1007
ExpressionUtils.ValidateOneArgument(method,
ExpressionType
.Dynamic, arg3, parameters[4], nameof(delegateType), nameof(arg3));
1028
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
1050
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
1086
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
1127
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
1173
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
1220
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
System\Linq\Expressions\ElementInit.cs (1)
98
ValidateArgumentTypes(addMethod,
ExpressionType
.Call, ref argumentsRO, nameof(addMethod));
System\Linq\Expressions\Error.cs (1)
1091
internal static InvalidOperationException InvalidLvalue(
ExpressionType
p0)
System\Linq\Expressions\Expression.cs (22)
43
public ExtensionInfo(
ExpressionType
nodeType, Type type)
49
internal readonly
ExpressionType
NodeType;
61
protected Expression(
ExpressionType
nodeType, Type type)
84
/// The <see cref="
ExpressionType
"/> of the <see cref="Expression"/>.
86
public virtual
ExpressionType
NodeType
162
/// This default implementation for <see cref="
ExpressionType
.Extension"/>
204
while (node.NodeType ==
ExpressionType
.Extension)
254
case
ExpressionType
.Index:
261
case
ExpressionType
.MemberAccess:
280
case
ExpressionType
.Parameter:
295
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
315
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
336
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
358
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
381
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
401
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
421
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
438
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
456
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
475
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
495
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
512
/// <see cref="
ExpressionType
.Dynamic">Dynamic</see> and has the
System\Linq\Expressions\Expression.DebuggerProxy.cs (24)
29
public
ExpressionType
NodeType => _node.NodeType;
47
public
ExpressionType
NodeType => _node.NodeType;
83
public
ExpressionType
NodeType => _node.NodeType;
100
public
ExpressionType
NodeType => _node.NodeType;
121
public
ExpressionType
NodeType => _node.NodeType;
139
public
ExpressionType
NodeType => _node.NodeType;
156
public
ExpressionType
NodeType => _node.NodeType;
176
public
ExpressionType
NodeType => _node.NodeType;
195
public
ExpressionType
NodeType => _node.NodeType;
212
public
ExpressionType
NodeType => _node.NodeType;
231
public
ExpressionType
NodeType => _node.NodeType;
252
public
ExpressionType
NodeType => _node.NodeType;
271
public
ExpressionType
NodeType => _node.NodeType;
289
public
ExpressionType
NodeType => _node.NodeType;
307
public
ExpressionType
NodeType => _node.NodeType;
325
public
ExpressionType
NodeType => _node.NodeType;
343
public
ExpressionType
NodeType => _node.NodeType;
362
public
ExpressionType
NodeType => _node.NodeType;
380
public
ExpressionType
NodeType => _node.NodeType;
396
public
ExpressionType
NodeType => _node.NodeType;
430
public
ExpressionType
NodeType => _node.NodeType;
451
public
ExpressionType
NodeType => _node.NodeType;
468
public
ExpressionType
NodeType => _node.NodeType;
488
public
ExpressionType
NodeType => _node.NodeType;
System\Linq\Expressions\ExpressionStringBuilder.cs (75)
144
if (node.NodeType ==
ExpressionType
.ArrayIndex)
160
case
ExpressionType
.AndAlso:
163
case
ExpressionType
.OrElse:
166
case
ExpressionType
.Assign:
169
case
ExpressionType
.Equal:
172
case
ExpressionType
.NotEqual:
175
case
ExpressionType
.GreaterThan:
178
case
ExpressionType
.LessThan:
181
case
ExpressionType
.GreaterThanOrEqual:
184
case
ExpressionType
.LessThanOrEqual:
187
case
ExpressionType
.Add:
188
case
ExpressionType
.AddChecked:
191
case
ExpressionType
.AddAssign:
192
case
ExpressionType
.AddAssignChecked:
195
case
ExpressionType
.Subtract:
196
case
ExpressionType
.SubtractChecked:
199
case
ExpressionType
.SubtractAssign:
200
case
ExpressionType
.SubtractAssignChecked:
203
case
ExpressionType
.Divide:
206
case
ExpressionType
.DivideAssign:
209
case
ExpressionType
.Modulo:
212
case
ExpressionType
.ModuloAssign:
215
case
ExpressionType
.Multiply:
216
case
ExpressionType
.MultiplyChecked:
219
case
ExpressionType
.MultiplyAssign:
220
case
ExpressionType
.MultiplyAssignChecked:
223
case
ExpressionType
.LeftShift:
226
case
ExpressionType
.LeftShiftAssign:
229
case
ExpressionType
.RightShift:
232
case
ExpressionType
.RightShiftAssign:
235
case
ExpressionType
.And:
238
case
ExpressionType
.AndAssign:
241
case
ExpressionType
.Or:
244
case
ExpressionType
.OrAssign:
247
case
ExpressionType
.ExclusiveOr:
250
case
ExpressionType
.ExclusiveOrAssign:
253
case
ExpressionType
.Power:
256
case
ExpressionType
.PowerAssign:
259
case
ExpressionType
.Coalesce:
543
case
ExpressionType
.NewArrayBounds:
549
case
ExpressionType
.NewArrayInit:
588
case
ExpressionType
.TypeIs:
591
case
ExpressionType
.TypeEqual:
604
case
ExpressionType
.Negate:
605
case
ExpressionType
.NegateChecked: Out('-'); break;
606
case
ExpressionType
.Not: Out("Not("); break;
607
case
ExpressionType
.IsFalse: Out("IsFalse("); break;
608
case
ExpressionType
.IsTrue: Out("IsTrue("); break;
609
case
ExpressionType
.OnesComplement: Out("~("); break;
610
case
ExpressionType
.ArrayLength: Out("ArrayLength("); break;
611
case
ExpressionType
.Convert: Out("Convert("); break;
612
case
ExpressionType
.ConvertChecked: Out("ConvertChecked("); break;
613
case
ExpressionType
.Throw: Out("throw("); break;
614
case
ExpressionType
.TypeAs: Out('('); break;
615
case
ExpressionType
.UnaryPlus: Out('+'); break;
616
case
ExpressionType
.Unbox: Out("Unbox("); break;
617
case
ExpressionType
.Increment: Out("Increment("); break;
618
case
ExpressionType
.Decrement: Out("Decrement("); break;
619
case
ExpressionType
.PreIncrementAssign: Out("++"); break;
620
case
ExpressionType
.PreDecrementAssign: Out("--"); break;
621
case
ExpressionType
.Quote:
622
case
ExpressionType
.PostIncrementAssign:
623
case
ExpressionType
.PostDecrementAssign:
633
case
ExpressionType
.Negate:
634
case
ExpressionType
.NegateChecked:
635
case
ExpressionType
.UnaryPlus:
636
case
ExpressionType
.PreDecrementAssign:
637
case
ExpressionType
.PreIncrementAssign:
638
case
ExpressionType
.Quote:
640
case
ExpressionType
.TypeAs:
644
case
ExpressionType
.Convert:
645
case
ExpressionType
.ConvertChecked:
649
case
ExpressionType
.PostIncrementAssign: Out("++"); break;
650
case
ExpressionType
.PostDecrementAssign: Out("--"); break;
793
Out(node.NodeType ==
ExpressionType
.Extension ? node.GetType().FullName : node.NodeType.ToString());
System\Linq\Expressions\GotoExpression.cs (3)
55
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
56
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Goto;
System\Linq\Expressions\IndexExpression.cs (3)
42
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
43
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Index;
System\Linq\Expressions\Interpreter\LightCompiler.cs (151)
735
case
ExpressionType
.Index:
739
case
ExpressionType
.MemberAccess:
743
case
ExpressionType
.Parameter:
744
case
ExpressionType
.Extension:
779
case
ExpressionType
.Equal:
780
case
ExpressionType
.NotEqual:
806
if (node.NodeType ==
ExpressionType
.Equal)
827
node.NodeType ==
ExpressionType
.Equal ? AstUtils.BoxedFalse : AstUtils.BoxedTrue,
864
case
ExpressionType
.LessThan:
865
case
ExpressionType
.LessThanOrEqual:
866
case
ExpressionType
.GreaterThan:
867
case
ExpressionType
.GreaterThanOrEqual:
897
case
ExpressionType
.ArrayIndex:
904
case
ExpressionType
.Add:
905
case
ExpressionType
.AddChecked:
906
case
ExpressionType
.Subtract:
907
case
ExpressionType
.SubtractChecked:
908
case
ExpressionType
.Multiply:
909
case
ExpressionType
.MultiplyChecked:
910
case
ExpressionType
.Divide:
911
case
ExpressionType
.Modulo:
915
case
ExpressionType
.ExclusiveOr:
920
case
ExpressionType
.Or:
925
case
ExpressionType
.And:
931
case
ExpressionType
.Equal:
935
case
ExpressionType
.NotEqual:
939
case
ExpressionType
.LessThan:
940
case
ExpressionType
.LessThanOrEqual:
941
case
ExpressionType
.GreaterThan:
942
case
ExpressionType
.GreaterThanOrEqual:
946
case
ExpressionType
.LeftShift:
951
case
ExpressionType
.RightShift:
1007
case
ExpressionType
.LessThan: _instructions.EmitLessThan(left.Type, node.IsLiftedToNull); break;
1008
case
ExpressionType
.LessThanOrEqual: _instructions.EmitLessThanOrEqual(left.Type, node.IsLiftedToNull); break;
1009
case
ExpressionType
.GreaterThan: _instructions.EmitGreaterThan(left.Type, node.IsLiftedToNull); break;
1010
case
ExpressionType
.GreaterThanOrEqual: _instructions.EmitGreaterThanOrEqual(left.Type, node.IsLiftedToNull); break;
1015
private void CompileArithmetic(
ExpressionType
nodeType, Expression left, Expression right)
1022
case
ExpressionType
.Add: _instructions.EmitAdd(left.Type, @checked: false); break;
1023
case
ExpressionType
.AddChecked: _instructions.EmitAdd(left.Type, @checked: true); break;
1024
case
ExpressionType
.Subtract: _instructions.EmitSub(left.Type, @checked: false); break;
1025
case
ExpressionType
.SubtractChecked: _instructions.EmitSub(left.Type, @checked: true); break;
1026
case
ExpressionType
.Multiply: _instructions.EmitMul(left.Type, @checked: false); break;
1027
case
ExpressionType
.MultiplyChecked: _instructions.EmitMul(left.Type, @checked: true); break;
1028
case
ExpressionType
.Divide: _instructions.EmitDiv(left.Type); break;
1029
case
ExpressionType
.Modulo: _instructions.EmitModulo(left.Type); break;
1109
CompileConvertToType(node.Operand.Type, node.Type, node.NodeType ==
ExpressionType
.ConvertChecked, node.IsLiftedToNull);
1237
case
ExpressionType
.Not:
1238
case
ExpressionType
.OnesComplement:
1241
case
ExpressionType
.TypeAs:
1244
case
ExpressionType
.ArrayLength:
1248
case
ExpressionType
.NegateChecked:
1252
case
ExpressionType
.Negate:
1256
case
ExpressionType
.Increment:
1260
case
ExpressionType
.Decrement:
1264
case
ExpressionType
.UnaryPlus:
1267
case
ExpressionType
.IsTrue:
1268
case
ExpressionType
.IsFalse:
1311
_instructions.EmitLoad(node.NodeType ==
ExpressionType
.IsTrue);
1318
_instructions.EmitLoad(node.NodeType ==
ExpressionType
.IsTrue);
1835
case
ExpressionType
.Label:
1854
case
ExpressionType
.Block:
1863
case
ExpressionType
.Switch:
1877
case
ExpressionType
.Convert:
1886
case
ExpressionType
.Conditional:
1887
case
ExpressionType
.Loop:
1888
case
ExpressionType
.Goto:
2230
case
ExpressionType
.Parameter:
2231
case
ExpressionType
.Call:
2232
case
ExpressionType
.ArrayIndex:
2234
case
ExpressionType
.Index:
2236
case
ExpressionType
.MemberAccess:
2255
case
ExpressionType
.Parameter:
2259
case
ExpressionType
.ArrayIndex:
2263
case
ExpressionType
.Index:
2302
case
ExpressionType
.MemberAccess:
2332
case
ExpressionType
.Call:
2528
if (node.NodeType ==
ExpressionType
.NewArrayInit)
2534
Debug.Assert(node.NodeType ==
ExpressionType
.NewArrayBounds);
2900
Debug.Assert(expr.NodeType ==
ExpressionType
.TypeEqual);
2923
Debug.Assert(expr.NodeType ==
ExpressionType
.TypeIs);
2983
case
ExpressionType
.Assign:
2987
case
ExpressionType
.Block:
2991
case
ExpressionType
.Throw:
2995
case
ExpressionType
.Constant:
2996
case
ExpressionType
.Default:
2997
case
ExpressionType
.Parameter:
3030
case
ExpressionType
.Add:
3031
case
ExpressionType
.AddChecked:
3032
case
ExpressionType
.And:
3033
case
ExpressionType
.ArrayIndex:
3034
case
ExpressionType
.Divide:
3035
case
ExpressionType
.Equal:
3036
case
ExpressionType
.ExclusiveOr:
3037
case
ExpressionType
.GreaterThan:
3038
case
ExpressionType
.GreaterThanOrEqual:
3039
case
ExpressionType
.LeftShift:
3040
case
ExpressionType
.LessThan:
3041
case
ExpressionType
.LessThanOrEqual:
3042
case
ExpressionType
.Modulo:
3043
case
ExpressionType
.Multiply:
3044
case
ExpressionType
.MultiplyChecked:
3045
case
ExpressionType
.NotEqual:
3046
case
ExpressionType
.Or:
3047
case
ExpressionType
.Power:
3048
case
ExpressionType
.RightShift:
3049
case
ExpressionType
.Subtract:
3050
case
ExpressionType
.SubtractChecked: CompileBinaryExpression(expr); break;
3051
case
ExpressionType
.AndAlso: CompileAndAlsoBinaryExpression(expr); break;
3052
case
ExpressionType
.OrElse: CompileOrElseBinaryExpression(expr); break;
3053
case
ExpressionType
.Coalesce: CompileCoalesceBinaryExpression(expr); break;
3054
case
ExpressionType
.ArrayLength:
3055
case
ExpressionType
.Decrement:
3056
case
ExpressionType
.Increment:
3057
case
ExpressionType
.IsTrue:
3058
case
ExpressionType
.IsFalse:
3059
case
ExpressionType
.Negate:
3060
case
ExpressionType
.NegateChecked:
3061
case
ExpressionType
.Not:
3062
case
ExpressionType
.OnesComplement:
3063
case
ExpressionType
.TypeAs:
3064
case
ExpressionType
.UnaryPlus: CompileUnaryExpression(expr); break;
3065
case
ExpressionType
.Convert:
3066
case
ExpressionType
.ConvertChecked: CompileConvertUnaryExpression(expr); break;
3067
case
ExpressionType
.Quote: CompileQuoteUnaryExpression(expr); break;
3068
case
ExpressionType
.Throw: CompileThrowUnaryExpression(expr, expr.Type == typeof(void)); break;
3069
case
ExpressionType
.Unbox: CompileUnboxUnaryExpression(expr); break;
3070
case
ExpressionType
.Call: CompileMethodCallExpression(expr); break;
3071
case
ExpressionType
.Conditional: CompileConditionalExpression(expr, expr.Type == typeof(void)); break;
3072
case
ExpressionType
.Constant: CompileConstantExpression(expr); break;
3073
case
ExpressionType
.Invoke: CompileInvocationExpression(expr); break;
3074
case
ExpressionType
.Lambda: CompileLambdaExpression(expr); break;
3075
case
ExpressionType
.ListInit: CompileListInitExpression(expr); break;
3076
case
ExpressionType
.MemberAccess: CompileMemberExpression(expr); break;
3077
case
ExpressionType
.MemberInit: CompileMemberInitExpression(expr); break;
3078
case
ExpressionType
.New: CompileNewExpression(expr); break;
3079
case
ExpressionType
.NewArrayInit:
3080
case
ExpressionType
.NewArrayBounds: CompileNewArrayExpression(expr); break;
3081
case
ExpressionType
.Parameter: CompileParameterExpression(expr); break;
3082
case
ExpressionType
.TypeIs: CompileTypeIsExpression(expr); break;
3083
case
ExpressionType
.TypeEqual: CompileTypeEqualExpression(expr); break;
3084
case
ExpressionType
.Assign: CompileAssignBinaryExpression(expr, expr.Type == typeof(void)); break;
3085
case
ExpressionType
.Block: CompileBlockExpression(expr, expr.Type == typeof(void)); break;
3086
case
ExpressionType
.DebugInfo: CompileDebugInfoExpression(expr); break;
3087
case
ExpressionType
.Default: CompileDefaultExpression(expr); break;
3088
case
ExpressionType
.Goto: CompileGotoExpression(expr); break;
3089
case
ExpressionType
.Index: CompileIndexExpression(expr); break;
3090
case
ExpressionType
.Label: CompileLabelExpression(expr); break;
3091
case
ExpressionType
.RuntimeVariables: CompileRuntimeVariablesExpression(expr); break;
3092
case
ExpressionType
.Loop: CompileLoopExpression(expr); break;
3093
case
ExpressionType
.Switch: CompileSwitchExpression(expr); break;
3094
case
ExpressionType
.Try: CompileTryExpression(expr); break;
System\Linq\Expressions\InvocationExpression.cs (32)
35
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
36
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Invoke;
116
return (Expression.NodeType ==
ExpressionType
.Quote)
426
ParameterInfo[] pis = GetParametersForValidation(method,
ExpressionType
.Invoke);
428
ValidateArgumentCount(method,
ExpressionType
.Invoke, 0, pis);
462
ParameterInfo[] pis = GetParametersForValidation(method,
ExpressionType
.Invoke);
464
ValidateArgumentCount(method,
ExpressionType
.Invoke, 1, pis);
466
arg0 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg0, pis[0], nameof(expression), nameof(arg0));
502
ParameterInfo[] pis = GetParametersForValidation(method,
ExpressionType
.Invoke);
504
ValidateArgumentCount(method,
ExpressionType
.Invoke, 2, pis);
506
arg0 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg0, pis[0], nameof(expression), nameof(arg0));
507
arg1 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg1, pis[1], nameof(expression), nameof(arg1));
547
ParameterInfo[] pis = GetParametersForValidation(method,
ExpressionType
.Invoke);
549
ValidateArgumentCount(method,
ExpressionType
.Invoke, 3, pis);
551
arg0 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg0, pis[0], nameof(expression), nameof(arg0));
552
arg1 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg1, pis[1], nameof(expression), nameof(arg1));
553
arg2 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg2, pis[2], nameof(expression), nameof(arg2));
596
ParameterInfo[] pis = GetParametersForValidation(method,
ExpressionType
.Invoke);
598
ValidateArgumentCount(method,
ExpressionType
.Invoke, 4, pis);
600
arg0 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg0, pis[0], nameof(expression), nameof(arg0));
601
arg1 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg1, pis[1], nameof(expression), nameof(arg1));
602
arg2 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg2, pis[2], nameof(expression), nameof(arg2));
603
arg3 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg3, pis[3], nameof(expression), nameof(arg3));
649
ParameterInfo[] pis = GetParametersForValidation(method,
ExpressionType
.Invoke);
651
ValidateArgumentCount(method,
ExpressionType
.Invoke, 5, pis);
653
arg0 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg0, pis[0], nameof(expression), nameof(arg0));
654
arg1 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg1, pis[1], nameof(expression), nameof(arg1));
655
arg2 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg2, pis[2], nameof(expression), nameof(arg2));
656
arg3 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg3, pis[3], nameof(expression), nameof(arg3));
657
arg4 = ValidateOneArgument(method,
ExpressionType
.Invoke, arg4, pis[4], nameof(expression), nameof(arg4));
735
ValidateArgumentTypes(mi,
ExpressionType
.Invoke, ref args, nameof(expression));
System\Linq\Expressions\LabelExpression.cs (3)
32
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
33
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Label;
System\Linq\Expressions\LambdaExpression.cs (21)
52
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
53
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Lambda;
650
/// <returns>An <see cref="Expression{TDelegate}"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
663
/// <returns>An <see cref="Expression{TDelegate}"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
675
/// <returns>An <see cref="Expression{TDelegate}"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
688
/// <returns>An <see cref="Expression{TDelegate}"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
701
/// <returns>An <see cref="Expression{TDelegate}"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
715
/// <returns>An <see cref="Expression{TDelegate}"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
735
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
748
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
760
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
773
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
786
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
799
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
811
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
824
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
836
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
850
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
888
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
905
/// <returns>A <see cref="LambdaExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Lambda"/> and the <see cref="LambdaExpression.Body"/> and <see cref="LambdaExpression.Parameters"/> properties set to the specified values.</returns>
System\Linq\Expressions\ListInitExpression.cs (8)
33
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
34
public sealed override
ExpressionType
NodeType =>
ExpressionType
.ListInit;
106
/// <returns>A <see cref="ListInitExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ListInit"/> and the <see cref="ListInitExpression.NewExpression"/> property set to the specified value.</returns>
119
/// <returns>A <see cref="ListInitExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ListInit"/> and the <see cref="ListInitExpression.NewExpression"/> property set to the specified value.</returns>
143
/// <returns>A <see cref="ListInitExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ListInit"/> and the <see cref="ListInitExpression.NewExpression"/> property set to the specified value.</returns>
157
/// <returns>A <see cref="ListInitExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ListInit"/> and the <see cref="ListInitExpression.NewExpression"/> property set to the specified value.</returns>
184
/// A <see cref="ListInitExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ListInit"/>
System\Linq\Expressions\LoopExpression.cs (3)
32
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
33
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Loop;
System\Linq\Expressions\MemberExpression.cs (3)
54
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
55
public sealed override
ExpressionType
NodeType =>
ExpressionType
.MemberAccess;
System\Linq\Expressions\MemberInitExpression.cs (5)
38
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
39
public sealed override
ExpressionType
NodeType =>
ExpressionType
.MemberInit;
139
/// <returns>A <see cref="MemberInitExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.MemberInit"/> and the <see cref="MemberInitExpression.NewExpression"/> and <see cref="MemberInitExpression.Bindings"/> properties set to the specified values.</returns>
151
/// <returns>A <see cref="MemberInitExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.MemberInit"/> and the <see cref="MemberInitExpression.NewExpression"/> and <see cref="MemberInitExpression.Bindings"/> properties set to the specified values.</returns>
System\Linq\Expressions\MethodCallExpression.cs (59)
29
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
30
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Call;
836
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
848
ValidateArgumentCount(method,
ExpressionType
.Call, 0, pis);
854
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
866
ValidateArgumentCount(method,
ExpressionType
.Call, 1, pis);
868
arg0 = ValidateOneArgument(method,
ExpressionType
.Call, arg0, pis[0], nameof(method), nameof(arg0));
874
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
888
ValidateArgumentCount(method,
ExpressionType
.Call, 2, pis);
890
arg0 = ValidateOneArgument(method,
ExpressionType
.Call, arg0, pis[0], nameof(method), nameof(arg0));
891
arg1 = ValidateOneArgument(method,
ExpressionType
.Call, arg1, pis[1], nameof(method), nameof(arg1));
897
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
913
ValidateArgumentCount(method,
ExpressionType
.Call, 3, pis);
915
arg0 = ValidateOneArgument(method,
ExpressionType
.Call, arg0, pis[0], nameof(method), nameof(arg0));
916
arg1 = ValidateOneArgument(method,
ExpressionType
.Call, arg1, pis[1], nameof(method), nameof(arg1));
917
arg2 = ValidateOneArgument(method,
ExpressionType
.Call, arg2, pis[2], nameof(method), nameof(arg2));
923
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
941
ValidateArgumentCount(method,
ExpressionType
.Call, 4, pis);
943
arg0 = ValidateOneArgument(method,
ExpressionType
.Call, arg0, pis[0], nameof(method), nameof(arg0));
944
arg1 = ValidateOneArgument(method,
ExpressionType
.Call, arg1, pis[1], nameof(method), nameof(arg1));
945
arg2 = ValidateOneArgument(method,
ExpressionType
.Call, arg2, pis[2], nameof(method), nameof(arg2));
946
arg3 = ValidateOneArgument(method,
ExpressionType
.Call, arg3, pis[3], nameof(method), nameof(arg3));
952
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
961
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
973
ValidateArgumentCount(method,
ExpressionType
.Call, 5, pis);
975
arg0 = ValidateOneArgument(method,
ExpressionType
.Call, arg0, pis[0], nameof(method), nameof(arg0));
976
arg1 = ValidateOneArgument(method,
ExpressionType
.Call, arg1, pis[1], nameof(method), nameof(arg1));
977
arg2 = ValidateOneArgument(method,
ExpressionType
.Call, arg2, pis[2], nameof(method), nameof(arg2));
978
arg3 = ValidateOneArgument(method,
ExpressionType
.Call, arg3, pis[3], nameof(method), nameof(arg3));
979
arg4 = ValidateOneArgument(method,
ExpressionType
.Call, arg4, pis[4], nameof(method), nameof(arg4));
989
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
1000
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
1011
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
1018
ValidateArgumentCount(method,
ExpressionType
.Call, 0, pis);
1034
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
1046
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
1056
ValidateArgumentCount(method,
ExpressionType
.Call, 1, pis);
1058
arg0 = ValidateOneArgument(method,
ExpressionType
.Call, arg0, pis[0], nameof(method), nameof(arg0));
1075
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
1084
ValidateArgumentCount(method,
ExpressionType
.Call, 2, pis);
1086
arg0 = ValidateOneArgument(method,
ExpressionType
.Call, arg0, pis[0], nameof(method), nameof(arg0));
1087
arg1 = ValidateOneArgument(method,
ExpressionType
.Call, arg1, pis[1], nameof(method), nameof(arg1));
1105
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Method"/> properties set to the specified values.</returns>
1115
ValidateArgumentCount(method,
ExpressionType
.Call, 3, pis);
1117
arg0 = ValidateOneArgument(method,
ExpressionType
.Call, arg0, pis[0], nameof(method), nameof(arg0));
1118
arg1 = ValidateOneArgument(method,
ExpressionType
.Call, arg1, pis[1], nameof(method), nameof(arg1));
1119
arg2 = ValidateOneArgument(method,
ExpressionType
.Call, arg2, pis[2], nameof(method), nameof(arg2));
1129
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/>, the <see cref="MethodCallExpression.Object"/> property equal to <paramref name="instance"/>, <see cref="MethodCallExpression.Method"/> set to the <see cref="MethodInfo"/> that represents the specified instance method, and <see cref="MethodCallExpression.Arguments"/> set to the specified arguments.</returns>
1153
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/>, the <see cref="MethodCallExpression.Method"/> property set to the <see cref="MethodInfo"/> that represents the specified static (Shared in Visual Basic) method, and the <see cref="MethodCallExpression.Arguments"/> property set to the specified arguments.</returns>
1181
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/>, <see cref="MethodCallExpression.Method"/>, and <see cref="MethodCallExpression.Arguments"/> properties set to the specified values.</returns>
1227
ValidateArgumentTypes(method,
ExpressionType
.Call, ref argList, nameof(method));
1244
return GetParametersForValidation(method,
ExpressionType
.Call);
1269
private static void ValidateArgumentTypes(MethodBase method,
ExpressionType
nodeKind, ref ReadOnlyCollection<Expression> arguments, string methodParamName)
1274
private static ParameterInfo[] GetParametersForValidation(MethodBase method,
ExpressionType
nodeKind)
1279
private static void ValidateArgumentCount(MethodBase method,
ExpressionType
nodeKind, int count, ParameterInfo[] pis)
1284
private static Expression ValidateOneArgument(MethodBase method,
ExpressionType
nodeKind, Expression arg, ParameterInfo pi, string methodParamName, string argumentParamName)
1393
/// <returns>A <see cref="BinaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ArrayIndex"/> and the <see cref="BinaryExpression.Left"/> and <see cref="BinaryExpression.Right"/> properties set to the specified values.</returns>
1402
/// <returns>A <see cref="MethodCallExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Call"/> and the <see cref="MethodCallExpression.Object"/> and <see cref="MethodCallExpression.Arguments"/> properties set to the specified values.</returns>
System\Linq\Expressions\NewArrayExpression.cs (16)
26
internal static NewArrayExpression Make(
ExpressionType
nodeType, Type type, ReadOnlyCollection<Expression> expressions)
29
if (nodeType ==
ExpressionType
.NewArrayInit)
46
/// Gets the bounds of the array if the value of the <see cref="
ExpressionType
"/> property is NewArrayBounds, or the values to initialize the elements of the new array if the value of the <see cref="Expression.NodeType"/> property is NewArrayInit.
75
return NodeType ==
ExpressionType
.NewArrayInit
93
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
94
public sealed override
ExpressionType
NodeType =>
ExpressionType
.NewArrayInit;
108
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
109
public sealed override
ExpressionType
NodeType =>
ExpressionType
.NewArrayBounds;
121
/// <returns>A <see cref="NewArrayExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.NewArrayInit"/> and the <see cref="NewArrayExpression.Expressions"/> property set to the specified value.</returns>
133
/// <returns>A <see cref="NewArrayExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.NewArrayInit"/> and the <see cref="NewArrayExpression.Expressions"/> property set to the specified value.</returns>
178
return NewArrayExpression.Make(
ExpressionType
.NewArrayInit, type.MakeArrayType(), initializerList);
197
/// <returns>A <see cref="NewArrayExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.NewArrayBounds"/> and the <see cref="NewArrayExpression.Expressions"/> property set to the specified value.</returns>
209
/// <returns>A <see cref="NewArrayExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.NewArrayBounds"/> and the <see cref="NewArrayExpression.Expressions"/> property set to the specified value.</returns>
250
return NewArrayExpression.Make(
ExpressionType
.NewArrayBounds, arrayType, boundsList);
System\Linq\Expressions\NewExpression.cs (10)
38
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
39
public sealed override
ExpressionType
NodeType =>
ExpressionType
.New;
113
/// <returns>A <see cref="NewExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.New"/> and the <see cref="NewExpression.Constructor"/> property set to the specified value.</returns>
124
/// <returns>A <see cref="NewExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.New"/> and the <see cref="NewExpression.Constructor"/> and <see cref="NewExpression.Arguments"/> properties set to the specified value.</returns>
135
/// <returns>A <see cref="NewExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.New"/> and the <see cref="NewExpression.Constructor"/> and <see cref="NewExpression.Arguments"/> properties set to the specified value.</returns>
149
ValidateArgumentTypes(constructor,
ExpressionType
.New, ref argList, nameof(constructor));
160
/// <returns>A <see cref="NewExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.New"/> and the <see cref="NewExpression.Constructor"/>, <see cref="NewExpression.Arguments"/> and <see cref="NewExpression.Members"/> properties set to the specified value.</returns>
185
/// <returns>A <see cref="NewExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.New"/> and the <see cref="NewExpression.Constructor"/>, <see cref="NewExpression.Arguments"/> and <see cref="NewExpression.Members"/> properties set to the specified value.</returns>
196
/// <returns>A <see cref="NewExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.New"/> and the <see cref="NewExpression.Constructor"/> property set to the <see cref="ConstructorInfo"/> that represents the parameterless constructor of the specified type.</returns>
System\Linq\Expressions\ParameterExpression.cs (3)
80
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
81
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Parameter;
System\Linq\Expressions\RuntimeVariablesExpression.cs (5)
35
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
36
public sealed override
ExpressionType
NodeType =>
ExpressionType
.RuntimeVariables;
78
/// <returns>An instance of <see cref="RuntimeVariablesExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.RuntimeVariables"/> and the <see cref="RuntimeVariablesExpression.Variables"/> property set to the specified value.</returns>
88
/// <returns>An instance of <see cref="RuntimeVariablesExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.RuntimeVariables"/> and the <see cref="RuntimeVariablesExpression.Variables"/> property set to the specified value.</returns>
System\Linq\Expressions\SwitchExpression.cs (3)
37
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
38
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Switch;
System\Linq\Expressions\TryExpression.cs (3)
42
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
43
public sealed override
ExpressionType
NodeType =>
ExpressionType
.Try;
System\Linq\Expressions\TypeBinaryExpression.cs (9)
17
internal TypeBinaryExpression(Expression expression, Type typeOperand,
ExpressionType
nodeType)
34
/// <returns>The <see cref="
ExpressionType
"/> of the expression.</returns>
35
public sealed override
ExpressionType
NodeType { get; }
80
if (Expression.NodeType ==
ExpressionType
.Constant)
175
if (NodeType ==
ExpressionType
.TypeIs)
190
/// <returns>A <see cref="TypeBinaryExpression"/> for which the <see cref="NodeType"/> property is equal to <see cref="
ExpressionType
.TypeIs"/> and for which the <see cref="TypeBinaryExpression.Expression"/> and <see cref="TypeBinaryExpression.TypeOperand"/> properties are set to the specified values.</returns>
197
return new TypeBinaryExpression(expression, type,
ExpressionType
.TypeIs);
205
/// <returns>A <see cref="TypeBinaryExpression"/> for which the <see cref="NodeType"/> property is equal to <see cref="
ExpressionType
.TypeEqual"/> and for which the <see cref="TypeBinaryExpression.Expression"/> and <see cref="TypeBinaryExpression.TypeOperand"/> properties are set to the specified values.</returns>
212
return new TypeBinaryExpression(expression, type,
ExpressionType
.TypeEqual);
System\Linq\Expressions\UnaryExpression.cs (121)
18
internal UnaryExpression(
ExpressionType
nodeType, Expression expression, Type type, MethodInfo? method)
35
/// <returns>The <see cref="
ExpressionType
"/> that represents this expression.</returns>
36
public sealed override
ExpressionType
NodeType { get; }
41
/// <returns> An <see cref="Expression"/> that represents the operand of the unary operation. Returns null if node type is <see cref="
ExpressionType
.Throw"/> with no operand.</returns>
58
if (NodeType ==
ExpressionType
.TypeAs || NodeType ==
ExpressionType
.Quote || NodeType ==
ExpressionType
.Throw)
96
case
ExpressionType
.PreIncrementAssign:
97
case
ExpressionType
.PreDecrementAssign:
98
case
ExpressionType
.PostIncrementAssign:
99
case
ExpressionType
.PostDecrementAssign:
119
case
ExpressionType
.Index:
121
case
ExpressionType
.MemberAccess:
124
Debug.Assert(Operand.NodeType ==
ExpressionType
.Parameter);
133
get { return NodeType ==
ExpressionType
.PreIncrementAssign || NodeType ==
ExpressionType
.PreDecrementAssign; }
138
ExpressionType
functional;
139
if (NodeType ==
ExpressionType
.PreIncrementAssign || NodeType ==
ExpressionType
.PostIncrementAssign)
141
functional =
ExpressionType
.Increment;
145
Debug.Assert(NodeType ==
ExpressionType
.PreDecrementAssign || NodeType ==
ExpressionType
.PostDecrementAssign);
146
functional =
ExpressionType
.Decrement;
297
/// <param name="unaryType">The <see cref="
ExpressionType
"/> that specifies the type of unary operation.</param>
303
public static UnaryExpression MakeUnary(
ExpressionType
unaryType, Expression operand, Type type)
311
/// <param name="unaryType">The <see cref="
ExpressionType
"/> that specifies the type of unary operation.</param>
318
public static UnaryExpression MakeUnary(
ExpressionType
unaryType, Expression operand, Type type, MethodInfo? method) =>
321
ExpressionType
.Negate => Negate(operand, method),
322
ExpressionType
.NegateChecked => NegateChecked(operand, method),
323
ExpressionType
.Not => Not(operand, method),
324
ExpressionType
.IsFalse => IsFalse(operand, method),
325
ExpressionType
.IsTrue => IsTrue(operand, method),
326
ExpressionType
.OnesComplement => OnesComplement(operand, method),
327
ExpressionType
.ArrayLength => ArrayLength(operand),
328
ExpressionType
.Convert => Convert(operand, type, method),
329
ExpressionType
.ConvertChecked => ConvertChecked(operand, type, method),
330
ExpressionType
.Throw => Throw(operand, type),
331
ExpressionType
.TypeAs => TypeAs(operand, type),
332
ExpressionType
.Quote => Quote(operand),
333
ExpressionType
.UnaryPlus => UnaryPlus(operand, method),
334
ExpressionType
.Unbox => Unbox(operand, type),
335
ExpressionType
.Increment => Increment(operand, method),
336
ExpressionType
.Decrement => Decrement(operand, method),
337
ExpressionType
.PreIncrementAssign => PreIncrementAssign(operand, method),
338
ExpressionType
.PostIncrementAssign => PostIncrementAssign(operand, method),
339
ExpressionType
.PreDecrementAssign => PreDecrementAssign(operand, method),
340
ExpressionType
.PostDecrementAssign => PostDecrementAssign(operand, method),
344
private static UnaryExpression GetUserDefinedUnaryOperatorOrThrow(
ExpressionType
unaryType, string name, Expression operand)
357
private static UnaryExpression? GetUserDefinedUnaryOperator(
ExpressionType
unaryType, string name, Expression operand)
380
private static UnaryExpression GetMethodBasedUnaryOperator(
ExpressionType
unaryType, Expression operand, MethodInfo method)
403
private static UnaryExpression GetUserDefinedCoercionOrThrow(
ExpressionType
coercionType, Expression expression, Type convertToType)
413
private static UnaryExpression? GetUserDefinedCoercion(
ExpressionType
coercionType, Expression expression, Type convertToType)
426
private static UnaryExpression GetMethodBasedCoercionOperator(
ExpressionType
unaryType, Expression operand, Type convertToType, MethodInfo method)
454
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Negate"/> and the <see cref="UnaryExpression.Operand"/> properties set to the specified value.</returns>
467
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Negate"/> and the <see cref="UnaryExpression.Operand"/> and <see cref="UnaryExpression.Method"/> properties set to the specified value.</returns>
478
return new UnaryExpression(
ExpressionType
.Negate, expression, expression.Type, null);
480
return GetUserDefinedUnaryOperatorOrThrow(
ExpressionType
.Negate, "op_UnaryNegation", expression);
482
return GetMethodBasedUnaryOperator(
ExpressionType
.Negate, expression, method);
489
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.UnaryPlus"/> and the <see cref="UnaryExpression.Operand"/> property set to the specified value.</returns>
502
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.UnaryPlus"/> and the <see cref="UnaryExpression.Operand"/> and <see cref="UnaryExpression.Method"/>property set to the specified value.</returns>
513
return new UnaryExpression(
ExpressionType
.UnaryPlus, expression, expression.Type, null);
515
return GetUserDefinedUnaryOperatorOrThrow(
ExpressionType
.UnaryPlus, "op_UnaryPlus", expression);
517
return GetMethodBasedUnaryOperator(
ExpressionType
.UnaryPlus, expression, method);
521
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.NegateChecked"/> and the <see cref="UnaryExpression.Operand"/> property set to the specified value.</returns>
531
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.NegateChecked"/> and the <see cref="UnaryExpression.Operand"/> and <see cref="UnaryExpression.Method"/> properties set to the specified values.</returns>
547
return new UnaryExpression(
ExpressionType
.NegateChecked, expression, expression.Type, null);
549
return GetUserDefinedUnaryOperatorOrThrow(
ExpressionType
.NegateChecked, "op_UnaryNegation", expression);
551
return GetMethodBasedUnaryOperator(
ExpressionType
.NegateChecked, expression, method);
555
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Not"/> and the <see cref="UnaryExpression.Operand"/> property set to the specified value.</returns>
566
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Not"/> and the <see cref="UnaryExpression.Operand"/> and <see cref="UnaryExpression.Method"/> properties set to the specified values.</returns>
582
return new UnaryExpression(
ExpressionType
.Not, expression, expression.Type, null);
584
UnaryExpression? u = GetUserDefinedUnaryOperator(
ExpressionType
.Not, "op_LogicalNot", expression);
589
return GetUserDefinedUnaryOperatorOrThrow(
ExpressionType
.Not, "op_OnesComplement", expression);
591
return GetMethodBasedUnaryOperator(
ExpressionType
.Not, expression, method);
617
return new UnaryExpression(
ExpressionType
.IsFalse, expression, expression.Type, null);
619
return GetUserDefinedUnaryOperatorOrThrow(
ExpressionType
.IsFalse, "op_False", expression);
621
return GetMethodBasedUnaryOperator(
ExpressionType
.IsFalse, expression, method);
647
return new UnaryExpression(
ExpressionType
.IsTrue, expression, expression.Type, null);
649
return GetUserDefinedUnaryOperatorOrThrow(
ExpressionType
.IsTrue, "op_True", expression);
651
return GetMethodBasedUnaryOperator(
ExpressionType
.IsTrue, expression, method);
677
return new UnaryExpression(
ExpressionType
.OnesComplement, expression, expression.Type, null);
679
return GetUserDefinedUnaryOperatorOrThrow(
ExpressionType
.OnesComplement, "op_OnesComplement", expression);
681
return GetMethodBasedUnaryOperator(
ExpressionType
.OnesComplement, expression, method);
685
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.TypeAs"/> and the <see cref="UnaryExpression.Operand"/> and <see cref="Expression.Type"/> properties set to the specified values.</returns>
700
return new UnaryExpression(
ExpressionType
.TypeAs, expression, type, null);
719
return new UnaryExpression(
ExpressionType
.Unbox, expression, type, null);
723
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Convert"/> and the <see cref="UnaryExpression.Operand"/> and <see cref="Expression.Type"/> properties set to the specified values.</returns>
735
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Convert"/> and the <see cref="UnaryExpression.Operand"/>, <see cref="Expression.Type"/>, and <see cref="UnaryExpression.Method"/> properties set to the specified values.</returns>
755
return new UnaryExpression(
ExpressionType
.Convert, expression, type, null);
757
return GetUserDefinedCoercionOrThrow(
ExpressionType
.Convert, expression, type);
759
return GetMethodBasedCoercionOperator(
ExpressionType
.Convert, expression, type, method);
763
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ConvertChecked"/> and the <see cref="UnaryExpression.Operand"/> and <see cref="Expression.Type"/> properties set to the specified values.</returns>
775
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ConvertChecked"/> and the <see cref="UnaryExpression.Operand"/>, <see cref="Expression.Type"/>, and <see cref="UnaryExpression.Method"/> properties set to the specified values.</returns>
794
return new UnaryExpression(
ExpressionType
.ConvertChecked, expression, type, null);
798
return new UnaryExpression(
ExpressionType
.Convert, expression, type, null);
800
return GetUserDefinedCoercionOrThrow(
ExpressionType
.ConvertChecked, expression, type);
802
return GetMethodBasedCoercionOperator(
ExpressionType
.ConvertChecked, expression, type, method);
806
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.ArrayLength"/> and the <see cref="UnaryExpression.Operand"/> property equal to <paramref name="array"/>.</returns>
825
return new UnaryExpression(
ExpressionType
.ArrayLength, array, typeof(int), null);
829
/// <returns>A <see cref="UnaryExpression"/> that has the <see cref="NodeType"/> property equal to <see cref="
ExpressionType
.Quote"/> and the <see cref="UnaryExpression.Operand"/> property set to the specified value.</returns>
842
return new UnaryExpression(
ExpressionType
.Quote, lambda, lambda.PublicType, null);
889
return new UnaryExpression(
ExpressionType
.Throw, value!, type, null);
915
return new UnaryExpression(
ExpressionType
.Increment, expression, expression.Type, null);
917
return GetUserDefinedUnaryOperatorOrThrow(
ExpressionType
.Increment, "op_Increment", expression);
919
return GetMethodBasedUnaryOperator(
ExpressionType
.Increment, expression, method);
945
return new UnaryExpression(
ExpressionType
.Decrement, expression, expression.Type, null);
947
return GetUserDefinedUnaryOperatorOrThrow(
ExpressionType
.Decrement, "op_Decrement", expression);
949
return GetMethodBasedUnaryOperator(
ExpressionType
.Decrement, expression, method);
960
return MakeOpAssignUnary(
ExpressionType
.PreIncrementAssign, expression, method: null);
972
return MakeOpAssignUnary(
ExpressionType
.PreIncrementAssign, expression, method);
983
return MakeOpAssignUnary(
ExpressionType
.PreDecrementAssign, expression, method: null);
995
return MakeOpAssignUnary(
ExpressionType
.PreDecrementAssign, expression, method);
1006
return MakeOpAssignUnary(
ExpressionType
.PostIncrementAssign, expression, method: null);
1018
return MakeOpAssignUnary(
ExpressionType
.PostIncrementAssign, expression, method);
1029
return MakeOpAssignUnary(
ExpressionType
.PostDecrementAssign, expression, method: null);
1041
return MakeOpAssignUnary(
ExpressionType
.PostDecrementAssign, expression, method);
1044
private static UnaryExpression MakeOpAssignUnary(
ExpressionType
kind, Expression expression, MethodInfo? method)
1057
if (kind ==
ExpressionType
.PreIncrementAssign || kind ==
ExpressionType
.PostIncrementAssign)
1063
Debug.Assert(kind ==
ExpressionType
.PreDecrementAssign || kind ==
ExpressionType
.PostDecrementAssign);
System.Linq.Queryable (3)
System\Linq\EnumerableRewriter.cs (3)
98
if (expr.NodeType !=
ExpressionType
.Quote)
102
if (!type.IsAssignableFrom(expr.Type) && type.IsArray && expr.NodeType ==
ExpressionType
.NewArrayInit)
348
if (arg.NodeType ==
ExpressionType
.Quote)