28 instantiations of UnaryExpression
System.Linq.Expressions (28)
System\Linq\Expressions\Compiler\StackSpiller.cs (2)
595expr = new UnaryExpression(ExpressionType.Throw, value.Node, node.Type, null); 618expr = new UnaryExpression(node.NodeType, expression.Node, node.Type, node.Method);
System\Linq\Expressions\UnaryExpression.cs (26)
148return new UnaryExpression(functional, operand, operand.Type, Method); 365return new UnaryExpression(unaryType, operand, method.ReturnType, method); 374return new UnaryExpression(unaryType, operand, method.ReturnType.LiftPrimitiveOrThrow(), method); 390return new UnaryExpression(unaryType, operand, method.ReturnType, method); 397return new UnaryExpression(unaryType, operand, method.ReturnType.LiftPrimitiveOrThrow(), method); 418return new UnaryExpression(coercionType, expression, convertToType, method); 437return new UnaryExpression(unaryType, operand, method.ReturnType, method); 445return new UnaryExpression(unaryType, operand, convertToType, method); 478return new UnaryExpression(ExpressionType.Negate, expression, expression.Type, null); 513return new UnaryExpression(ExpressionType.UnaryPlus, expression, expression.Type, null); 547return new UnaryExpression(ExpressionType.NegateChecked, expression, expression.Type, null); 582return new UnaryExpression(ExpressionType.Not, expression, expression.Type, null); 617return new UnaryExpression(ExpressionType.IsFalse, expression, expression.Type, null); 647return new UnaryExpression(ExpressionType.IsTrue, expression, expression.Type, null); 677return new UnaryExpression(ExpressionType.OnesComplement, expression, expression.Type, null); 700return new UnaryExpression(ExpressionType.TypeAs, expression, type, null); 719return new UnaryExpression(ExpressionType.Unbox, expression, type, null); 755return new UnaryExpression(ExpressionType.Convert, expression, type, null); 794return new UnaryExpression(ExpressionType.ConvertChecked, expression, type, null); 798return new UnaryExpression(ExpressionType.Convert, expression, type, null); 825return new UnaryExpression(ExpressionType.ArrayLength, array, typeof(int), null); 842return new UnaryExpression(ExpressionType.Quote, lambda, lambda.PublicType, null); 889return new UnaryExpression(ExpressionType.Throw, value!, type, null); 915return new UnaryExpression(ExpressionType.Increment, expression, expression.Type, null); 945return new UnaryExpression(ExpressionType.Decrement, expression, expression.Type, null); 1054return new UnaryExpression(kind, expression, expression.Type, null);
285 references to UnaryExpression
Microsoft.AspNetCore.Components.Forms (2)
FieldIdentifier.cs (1)
100if (accessorBody is UnaryExpression unaryExpression
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
278var convertExpression = Expression.Convert(parameterExpression, memberExpression.Member.DeclaringType!);
Microsoft.AspNetCore.Components.Web (1)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
278var convertExpression = Expression.Convert(parameterExpression, memberExpression.Member.DeclaringType!);
Microsoft.AspNetCore.Http.Abstractions (2)
Extensions\UseMiddlewareExtensions.cs (2)
246private static UnaryExpression GetMethodArgument(ParameterInfo parameter, ParameterExpression providerArg, Type parameterType, Type? declaringType) 260var methodArgument = Expression.Convert(getServiceCall, parameterType);
Microsoft.AspNetCore.Http.Extensions (9)
RequestDelegateFactory.cs (4)
109private static readonly UnaryExpression TempSourceStringIsNotNullOrEmptyExpr = Expression.Not(Expression.Call(StringIsNullOrEmptyMethod, TempSourceStringExpr)); 179var targetExpression = handler.Target switch 252var targetExpression = Expression.Convert(TargetExpr, methodInfo.DeclaringType); 1216var box = Expression.TypeAs(methodCall, typeof(IResult));
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (5)
210var valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); 217var instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType()); 231var castMethodCall = Expression.Convert(methodCall, typeof(object)); 262var valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); 269var instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
Microsoft.AspNetCore.JsonPatch (2)
JsonPatchDocumentOfT.cs (2)
694listOfSegments.AddRange(GetPathSegments(((UnaryExpression)expr).Operand)); 731var converted = Expression.Convert(expression, typeof(object));
Microsoft.AspNetCore.Mvc.Core (6)
ModelBinding\ModelBindingHelper.cs (1)
292expression = ((UnaryExpression)expression).Operand;
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (5)
210var valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); 217var instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType()); 231var castMethodCall = Expression.Convert(methodCall, typeof(object)); 262var valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); 269var instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
CachedExpressionCompiler.cs (1)
176var castExpression =
ExpressionHelper.cs (1)
213var converted = Expression.Convert(indexExpression, typeof(object));
ModelStateDictionaryExtensions.cs (3)
152var unaryExpression = expression.Body as UnaryExpression; 164private static bool IsConversionToObject(UnaryExpression expression)
Microsoft.AspNetCore.OpenApi (5)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (5)
210var valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); 217var instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType()); 231var castMethodCall = Expression.Convert(methodCall, typeof(object)); 262var valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); 269var instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
Microsoft.AspNetCore.Shared.Tests (5)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (5)
210var valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); 217var instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType()); 231var castMethodCall = Expression.Convert(methodCall, typeof(object)); 262var valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); 269var instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
Microsoft.AspNetCore.SignalR.Core (5)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (5)
210var valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); 217var instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType()); 231var castMethodCall = Expression.Convert(methodCall, typeof(object)); 262var valueCast = Expression.Convert(valueObj, paramInfo.ParameterType); 269var instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
ExpressionTrees\Sources\ExprLambdaUtils.vb (1)
315Protected Overrides Function VisitUnary(node As UnaryExpression) As Expression
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
161new PredefinedTypeInfo(PredefinedType.PT_UNARYEXPRESSION, typeof(System.Linq.Expressions.UnaryExpression), "System.Linq.Expressions.UnaryExpression"),
Microsoft.ML.Core (18)
Utilities\FuncInstanceMethodInfo1`2.cs (3)
58if (!(expression is { Body: UnaryExpression { Operand: MethodCallExpression methodCallExpression } })) 83Contracts.CheckParam(expression.Body is UnaryExpression, nameof(expression), "Unexpected expression form"); 84Contracts.CheckParam(((UnaryExpression)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo1`3.cs (3)
59if (!(expression is { Body: UnaryExpression { Operand: MethodCallExpression methodCallExpression } })) 84Contracts.CheckParam(expression.Body is UnaryExpression, nameof(expression), "Unexpected expression form"); 85Contracts.CheckParam(((UnaryExpression)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo1`4.cs (3)
60if (!(expression is { Body: UnaryExpression { Operand: MethodCallExpression methodCallExpression } })) 85Contracts.CheckParam(expression.Body is UnaryExpression, nameof(expression), "Unexpected expression form"); 86Contracts.CheckParam(((UnaryExpression)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo2`4.cs (3)
60if (!(expression is { Body: UnaryExpression { Operand: MethodCallExpression methodCallExpression } })) 85Contracts.CheckParam(expression.Body is UnaryExpression, nameof(expression), "Unexpected expression form"); 86Contracts.CheckParam(((UnaryExpression)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo3`3.cs (3)
59if (!(expression is { Body: UnaryExpression { Operand: MethodCallExpression methodCallExpression } })) 84Contracts.CheckParam(expression.Body is UnaryExpression, nameof(expression), "Unexpected expression form"); 85Contracts.CheckParam(((UnaryExpression)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo3`4.cs (3)
60if (!(expression is { Body: UnaryExpression { Operand: MethodCallExpression methodCallExpression } })) 85Contracts.CheckParam(expression.Body is UnaryExpression, nameof(expression), "Unexpected expression form"); 86Contracts.CheckParam(((UnaryExpression)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
netstandard (1)
netstandard.cs (1)
1028[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.UnaryExpression))]
System.Core (1)
System.Core.cs (1)
166[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Linq.Expressions.UnaryExpression))]
System.Linq.Expressions (218)
System\Dynamic\DynamicObject.cs (1)
581UnaryExpression convert = Expression.Convert(resultMO.Expression, binder.ReturnType);
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (2)
47AddressOf((UnaryExpression)node, type); 207private void AddressOf(UnaryExpression node, Type type)
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (1)
98EmitThrow((UnaryExpression)node, CompilationFlags.EmitAsVoidType);
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (4)
463EmitBranchNot(branchValue, (UnaryExpression)node, label); 494private void EmitBranchNot(bool branch, UnaryExpression node, Label label) 572var convert = (UnaryExpression)expression;
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (12)
16EmitQuote((UnaryExpression)expr); 20private void EmitQuote(UnaryExpression quote) 41EmitThrow((UnaryExpression)expr, CompilationFlags.EmitAsDefaultType); 44private void EmitThrow(UnaryExpression expr, CompilationFlags flags) 63EmitUnary((UnaryExpression)expr, flags); 66private void EmitUnary(UnaryExpression node, CompilationFlags flags) 273var node = (UnaryExpression)expr; 283EmitConvert((UnaryExpression)expr, flags); 286private void EmitConvert(UnaryExpression node, CompilationFlags flags) 316UnaryExpression operand = Expression.Convert(node.Operand, paramType); 350private void EmitUnaryMethod(UnaryExpression node, CompilationFlags flags)
System\Linq\Expressions\Compiler\StackSpiller.cs (4)
577var node = (UnaryExpression)expr; 603var node = (UnaryExpression)expr;
System\Linq\Expressions\Compiler\VariableBinder.cs (1)
69protected internal override Expression VisitUnary(UnaryExpression node)
System\Linq\Expressions\DebugViewWriter.cs (1)
877protected internal override Expression VisitUnary(UnaryExpression node)
System\Linq\Expressions\Expression.DebuggerProxy.cs (2)
475private readonly UnaryExpression _node; 477public UnaryExpressionProxy(UnaryExpression node)
System\Linq\Expressions\ExpressionStringBuilder.cs (1)
600protected internal override Expression VisitUnary(UnaryExpression node)
System\Linq\Expressions\ExpressionVisitor.cs (5)
533/// Visits the children of the <see cref="UnaryExpression"/>. 538protected internal virtual Expression VisitUnary(UnaryExpression node) 639private static UnaryExpression ValidateUnary(UnaryExpression before, UnaryExpression after)
System\Linq\Expressions\Interpreter\LightCompiler.cs (14)
1036var node = (UnaryExpression)expr; 1219private void CompileNotExpression(UnaryExpression node) 1227var node = (UnaryExpression)expr; 1277private void EmitUnaryMethodCall(UnaryExpression node) 1299private void EmitUnaryBoolCheck(UnaryExpression node) 1934var node = (UnaryExpression)expr; 2770var unary = (UnaryExpression)expr; 2888var node = (UnaryExpression)expr; 2915private void CompileTypeAsExpression(UnaryExpression node)
System\Linq\Expressions\InvocationExpression.cs (1)
117? (LambdaExpression)((UnaryExpression)Expression).Operand
System\Linq\Expressions\UnaryExpression.cs (169)
136private UnaryExpression FunctionalOp(Expression operand) 282public UnaryExpression Update(Expression operand) 295/// Creates a <see cref="UnaryExpression"/>, given an operand, by calling the appropriate factory method. 300/// <returns>The <see cref="UnaryExpression"/> that results from calling the appropriate factory method.</returns> 303public static UnaryExpression MakeUnary(ExpressionType unaryType, Expression operand, Type type) 309/// Creates a <see cref="UnaryExpression"/>, given an operand and implementing method, by calling the appropriate factory method. 315/// <returns>The <see cref="UnaryExpression"/> that results from calling the appropriate factory method.</returns> 318public static UnaryExpression MakeUnary(ExpressionType unaryType, Expression operand, Type type, MethodInfo? method) => 344private static UnaryExpression GetUserDefinedUnaryOperatorOrThrow(ExpressionType unaryType, string name, Expression operand) 346UnaryExpression? u = GetUserDefinedUnaryOperator(unaryType, name, operand); 357private static UnaryExpression? GetUserDefinedUnaryOperator(ExpressionType unaryType, string name, Expression operand) 380private static UnaryExpression GetMethodBasedUnaryOperator(ExpressionType unaryType, Expression operand, MethodInfo method) 403private static UnaryExpression GetUserDefinedCoercionOrThrow(ExpressionType coercionType, Expression expression, Type convertToType) 405UnaryExpression? u = GetUserDefinedCoercion(coercionType, expression, convertToType); 413private static UnaryExpression? GetUserDefinedCoercion(ExpressionType coercionType, Expression expression, Type convertToType) 426private static UnaryExpression GetMethodBasedCoercionOperator(ExpressionType unaryType, Expression operand, Type convertToType, MethodInfo method) 451/// Creates a <see cref="UnaryExpression"/> that represents an arithmetic negation operation. 453/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 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> 457public static UnaryExpression Negate(Expression expression) 463/// Creates a <see cref="UnaryExpression"/> that represents an arithmetic negation operation. 465/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 466/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 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> 471public static UnaryExpression Negate(Expression expression, MethodInfo? method) 486/// Creates a <see cref="UnaryExpression"/> that represents a unary plus operation. 488/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 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> 492public static UnaryExpression UnaryPlus(Expression expression) 498/// Creates a <see cref="UnaryExpression"/> that represents a unary plus operation. 500/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 501/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 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> 506public static UnaryExpression UnaryPlus(Expression expression, MethodInfo? method) 520/// <summary>Creates a <see cref="UnaryExpression"/> that represents an arithmetic negation operation that has overflow checking.</summary> 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> 522/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 525public static UnaryExpression NegateChecked(Expression expression) 530/// <summary>Creates a <see cref="UnaryExpression"/> that represents an arithmetic negation operation that has overflow checking. The implementing method can be specified.</summary> 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> 532/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 533/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 540public static UnaryExpression NegateChecked(Expression expression, MethodInfo? method) 554/// <summary>Creates a <see cref="UnaryExpression"/> that represents a bitwise complement operation.</summary> 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> 556/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 560public static UnaryExpression Not(Expression expression) 565/// <summary>Creates a <see cref="UnaryExpression"/> that represents a bitwise complement operation. The implementing method can be specified.</summary> 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> 567/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 568/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 575public static UnaryExpression Not(Expression expression, MethodInfo? method) 584UnaryExpression? u = GetUserDefinedUnaryOperator(ExpressionType.Not, "op_LogicalNot", expression); 598/// <returns>An instance of <see cref="UnaryExpression"/>.</returns> 599public static UnaryExpression IsFalse(Expression expression) 609/// <returns>An instance of <see cref="UnaryExpression"/>.</returns> 610public static UnaryExpression IsFalse(Expression expression, MethodInfo? method) 628/// <returns>An instance of <see cref="UnaryExpression"/>.</returns> 629public static UnaryExpression IsTrue(Expression expression) 639/// <returns>An instance of <see cref="UnaryExpression"/>.</returns> 640public static UnaryExpression IsTrue(Expression expression, MethodInfo? method) 658/// <returns>An instance of <see cref="UnaryExpression"/>.</returns> 659public static UnaryExpression OnesComplement(Expression expression) 669/// <returns>An instance of <see cref="UnaryExpression"/>.</returns> 670public static UnaryExpression OnesComplement(Expression expression, MethodInfo? method) 684/// <summary>Creates a <see cref="UnaryExpression"/> that represents an explicit reference or boxing conversion where null is supplied if the conversion fails.</summary> 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> 686/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 690public static UnaryExpression TypeAs(Expression expression, Type type) 704/// <summary>Creates a <see cref="UnaryExpression"/> that represents an explicit unboxing.</summary> 708/// <returns>An instance of <see cref="UnaryExpression"/>.</returns> 709public static UnaryExpression Unbox(Expression expression, Type type) 722/// <summary>Creates a <see cref="UnaryExpression"/> that represents a conversion operation.</summary> 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> 724/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 729public static UnaryExpression Convert(Expression expression, Type type) 734/// <summary>Creates a <see cref="UnaryExpression"/> that represents a conversion operation for which the implementing method is specified.</summary> 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> 736/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 738/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 745public static UnaryExpression Convert(Expression expression, Type type, MethodInfo? method) 762/// <summary>Creates a <see cref="UnaryExpression"/> that represents a conversion operation that throws an exception if the target type is overflowed.</summary> 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> 764/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 769public static UnaryExpression ConvertChecked(Expression expression, Type type) 774/// <summary>Creates a <see cref="UnaryExpression"/> that represents a conversion operation that throws an exception if the target type is overflowed and for which the implementing method is specified.</summary> 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> 776/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 778/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 785public static UnaryExpression ConvertChecked(Expression expression, Type type, MethodInfo? method) 805/// <summary>Creates a <see cref="UnaryExpression"/> that represents getting the length of a one-dimensional, zero-based array.</summary> 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> 807/// <param name="array">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 812public static UnaryExpression ArrayLength(Expression array) 828/// <summary>Creates a <see cref="UnaryExpression"/> that represents an expression that has a constant value of type <see cref="Expression"/>.</summary> 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> 830/// <param name="expression">An <see cref="Expression"/> to set the <see cref="UnaryExpression.Operand"/> property equal to.</param> 833public static UnaryExpression Quote(Expression expression) 846/// Creates a <see cref="UnaryExpression"/> that represents a rethrowing of an exception. 848/// <returns>A <see cref="UnaryExpression"/> that represents a rethrowing of an exception.</returns> 849public static UnaryExpression Rethrow() 855/// Creates a <see cref="UnaryExpression"/> that represents a rethrowing of an exception with a given type. 858/// <returns>A <see cref="UnaryExpression"/> that represents a rethrowing of an exception.</returns> 859public static UnaryExpression Rethrow(Type type) 865/// Creates a <see cref="UnaryExpression"/> that represents a throwing of an exception. 868/// <returns>A <see cref="UnaryExpression"/> that represents the exception.</returns> 869public static UnaryExpression Throw(Expression? value) 875/// Creates a <see cref="UnaryExpression"/> that represents a throwing of a value with a given type. 879/// <returns>A <see cref="UnaryExpression"/> that represents the exception.</returns> 880public static UnaryExpression Throw(Expression? value, Type type) 893/// Creates a <see cref="UnaryExpression"/> that represents the incrementing of the expression by 1. 896/// <returns>A <see cref="UnaryExpression"/> that represents the incremented expression.</returns> 897public static UnaryExpression Increment(Expression expression) 903/// Creates a <see cref="UnaryExpression"/> that represents the incrementing of the expression by 1. 907/// <returns>A <see cref="UnaryExpression"/> that represents the incremented expression.</returns> 908public static UnaryExpression Increment(Expression expression, MethodInfo? method) 923/// Creates a <see cref="UnaryExpression"/> that represents the decrementing of the expression by 1. 926/// <returns>A <see cref="UnaryExpression"/> that represents the decremented expression.</returns> 927public static UnaryExpression Decrement(Expression expression) 933/// Creates a <see cref="UnaryExpression"/> that represents the decrementing of the expression by 1. 937/// <returns>A <see cref="UnaryExpression"/> that represents the decremented expression.</returns> 938public static UnaryExpression Decrement(Expression expression, MethodInfo? method) 953/// Creates a <see cref="UnaryExpression"/> that increments the expression by 1 957/// <returns>A <see cref="UnaryExpression"/> that represents the resultant expression.</returns> 958public static UnaryExpression PreIncrementAssign(Expression expression) 964/// Creates a <see cref="UnaryExpression"/> that increments the expression by 1 969/// <returns>A <see cref="UnaryExpression"/> that represents the resultant expression.</returns> 970public static UnaryExpression PreIncrementAssign(Expression expression, MethodInfo? method) 976/// Creates a <see cref="UnaryExpression"/> that decrements the expression by 1 980/// <returns>A <see cref="UnaryExpression"/> that represents the resultant expression.</returns> 981public static UnaryExpression PreDecrementAssign(Expression expression) 987/// Creates a <see cref="UnaryExpression"/> that decrements the expression by 1 992/// <returns>A <see cref="UnaryExpression"/> that represents the resultant expression.</returns> 993public static UnaryExpression PreDecrementAssign(Expression expression, MethodInfo? method) 999/// Creates a <see cref="UnaryExpression"/> that represents the assignment of the expression 1003/// <returns>A <see cref="UnaryExpression"/> that represents the resultant expression.</returns> 1004public static UnaryExpression PostIncrementAssign(Expression expression) 1010/// Creates a <see cref="UnaryExpression"/> that represents the assignment of the expression 1015/// <returns>A <see cref="UnaryExpression"/> that represents the resultant expression.</returns> 1016public static UnaryExpression PostIncrementAssign(Expression expression, MethodInfo? method) 1022/// Creates a <see cref="UnaryExpression"/> that represents the assignment of the expression 1026/// <returns>A <see cref="UnaryExpression"/> that represents the resultant expression.</returns> 1027public static UnaryExpression PostDecrementAssign(Expression expression) 1033/// Creates a <see cref="UnaryExpression"/> that represents the assignment of the expression 1038/// <returns>A <see cref="UnaryExpression"/> that represents the resultant expression.</returns> 1039public static UnaryExpression PostDecrementAssign(Expression expression, MethodInfo? method) 1044private static UnaryExpression MakeOpAssignUnary(ExpressionType kind, Expression expression, MethodInfo? method) 1049UnaryExpression result;
System.Linq.Queryable (2)
System\Linq\EnumerableRewriter.cs (2)
100expr = ((UnaryExpression)expr).Operand; 350arg = ((UnaryExpression)arg).Operand;
System.ServiceModel.Primitives (1)
System\ServiceModel\Dispatcher\InvokerUtil.cs (1)
149var castTargetParam = Expression.Convert(targetParam, method.DeclaringType);