28 instantiations of UnaryExpression
System.Linq.Expressions (28)
System\Linq\Expressions\Compiler\StackSpiller.cs (2)
595
expr = new
UnaryExpression
(ExpressionType.Throw, value.Node, node.Type, null);
618
expr = new
UnaryExpression
(node.NodeType, expression.Node, node.Type, node.Method);
System\Linq\Expressions\UnaryExpression.cs (26)
148
return new
UnaryExpression
(functional, operand, operand.Type, Method);
365
return new
UnaryExpression
(unaryType, operand, method.ReturnType, method);
374
return new
UnaryExpression
(unaryType, operand, method.ReturnType.LiftPrimitiveOrThrow(), method);
390
return new
UnaryExpression
(unaryType, operand, method.ReturnType, method);
397
return new
UnaryExpression
(unaryType, operand, method.ReturnType.LiftPrimitiveOrThrow(), method);
418
return new
UnaryExpression
(coercionType, expression, convertToType, method);
437
return new
UnaryExpression
(unaryType, operand, method.ReturnType, method);
445
return new
UnaryExpression
(unaryType, operand, convertToType, method);
478
return new
UnaryExpression
(ExpressionType.Negate, expression, expression.Type, null);
513
return new
UnaryExpression
(ExpressionType.UnaryPlus, expression, expression.Type, null);
547
return new
UnaryExpression
(ExpressionType.NegateChecked, expression, expression.Type, null);
582
return new
UnaryExpression
(ExpressionType.Not, expression, expression.Type, null);
617
return new
UnaryExpression
(ExpressionType.IsFalse, expression, expression.Type, null);
647
return new
UnaryExpression
(ExpressionType.IsTrue, expression, expression.Type, null);
677
return new
UnaryExpression
(ExpressionType.OnesComplement, expression, expression.Type, null);
700
return new
UnaryExpression
(ExpressionType.TypeAs, expression, type, null);
719
return new
UnaryExpression
(ExpressionType.Unbox, expression, type, null);
755
return new
UnaryExpression
(ExpressionType.Convert, expression, type, null);
794
return new
UnaryExpression
(ExpressionType.ConvertChecked, expression, type, null);
798
return new
UnaryExpression
(ExpressionType.Convert, expression, type, null);
825
return new
UnaryExpression
(ExpressionType.ArrayLength, array, typeof(int), null);
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);
945
return new
UnaryExpression
(ExpressionType.Decrement, expression, expression.Type, null);
1054
return new
UnaryExpression
(kind, expression, expression.Type, null);
284 references to UnaryExpression
Microsoft.AspNetCore.Components.Forms (2)
FieldIdentifier.cs (1)
100
if (accessorBody is
UnaryExpression
unaryExpression
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
278
var
convertExpression = Expression.Convert(parameterExpression, memberExpression.Member.DeclaringType!);
Microsoft.AspNetCore.Components.Web (1)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
278
var
convertExpression = Expression.Convert(parameterExpression, memberExpression.Member.DeclaringType!);
Microsoft.AspNetCore.Http.Abstractions (2)
Extensions\UseMiddlewareExtensions.cs (2)
246
private static
UnaryExpression
GetMethodArgument(ParameterInfo parameter, ParameterExpression providerArg, Type parameterType, Type? declaringType)
260
var
methodArgument = Expression.Convert(getServiceCall, parameterType);
Microsoft.AspNetCore.Http.Extensions (9)
RequestDelegateFactory.cs (4)
109
private static readonly
UnaryExpression
TempSourceStringIsNotNullOrEmptyExpr = Expression.Not(Expression.Call(StringIsNullOrEmptyMethod, TempSourceStringExpr));
179
var
targetExpression = handler.Target switch
252
var
targetExpression = Expression.Convert(TargetExpr, methodInfo.DeclaringType);
1216
var
box = Expression.TypeAs(methodCall, typeof(IResult));
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (5)
210
var
valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
217
var
instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
231
var
castMethodCall = Expression.Convert(methodCall, typeof(object));
262
var
valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
269
var
instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
Microsoft.AspNetCore.JsonPatch (2)
JsonPatchDocumentOfT.cs (2)
694
listOfSegments.AddRange(GetPathSegments(((
UnaryExpression
)expr).Operand));
731
var
converted = Expression.Convert(expression, typeof(object));
Microsoft.AspNetCore.Mvc.Core (6)
ModelBinding\ModelBindingHelper.cs (1)
292
expression = ((
UnaryExpression
)expression).Operand;
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (5)
210
var
valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
217
var
instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
231
var
castMethodCall = Expression.Convert(methodCall, typeof(object));
262
var
valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
269
var
instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
Microsoft.AspNetCore.Mvc.ViewFeatures (5)
CachedExpressionCompiler.cs (1)
176
var
castExpression =
ExpressionHelper.cs (1)
213
var
converted = Expression.Convert(indexExpression, typeof(object));
ModelStateDictionaryExtensions.cs (3)
152
var
unaryExpression = expression.Body as
UnaryExpression
;
164
private static bool IsConversionToObject(
UnaryExpression
expression)
Microsoft.AspNetCore.OpenApi (5)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (5)
210
var
valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
217
var
instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
231
var
castMethodCall = Expression.Convert(methodCall, typeof(object));
262
var
valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
269
var
instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
Microsoft.AspNetCore.Shared.Tests (5)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (5)
210
var
valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
217
var
instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
231
var
castMethodCall = Expression.Convert(methodCall, typeof(object));
262
var
valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
269
var
instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
Microsoft.AspNetCore.SignalR.Core (5)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (5)
210
var
valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
217
var
instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
231
var
castMethodCall = Expression.Convert(methodCall, typeof(object));
262
var
valueCast = Expression.Convert(valueObj, paramInfo.ParameterType);
269
var
instanceCast = Expression.Convert(targetParameter, targetTypeInfo.AsType());
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
ExpressionTrees\Sources\ExprLambdaUtils.vb (1)
315
Protected Overrides Function VisitUnary(node As
UnaryExpression
) As Expression
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
161
new PredefinedTypeInfo(PredefinedType.PT_UNARYEXPRESSION, typeof(System.Linq.Expressions.
UnaryExpression
), "System.Linq.Expressions.UnaryExpression"),
Microsoft.ML.Core (18)
Utilities\FuncInstanceMethodInfo1`2.cs (3)
58
if (!(expression is { Body:
UnaryExpression
{ Operand: MethodCallExpression methodCallExpression } }))
83
Contracts.CheckParam(expression.Body is
UnaryExpression
, nameof(expression), "Unexpected expression form");
84
Contracts.CheckParam(((
UnaryExpression
)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo1`3.cs (3)
59
if (!(expression is { Body:
UnaryExpression
{ Operand: MethodCallExpression methodCallExpression } }))
84
Contracts.CheckParam(expression.Body is
UnaryExpression
, nameof(expression), "Unexpected expression form");
85
Contracts.CheckParam(((
UnaryExpression
)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo1`4.cs (3)
60
if (!(expression is { Body:
UnaryExpression
{ Operand: MethodCallExpression methodCallExpression } }))
85
Contracts.CheckParam(expression.Body is
UnaryExpression
, nameof(expression), "Unexpected expression form");
86
Contracts.CheckParam(((
UnaryExpression
)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo2`4.cs (3)
60
if (!(expression is { Body:
UnaryExpression
{ Operand: MethodCallExpression methodCallExpression } }))
85
Contracts.CheckParam(expression.Body is
UnaryExpression
, nameof(expression), "Unexpected expression form");
86
Contracts.CheckParam(((
UnaryExpression
)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo3`3.cs (3)
59
if (!(expression is { Body:
UnaryExpression
{ Operand: MethodCallExpression methodCallExpression } }))
84
Contracts.CheckParam(expression.Body is
UnaryExpression
, nameof(expression), "Unexpected expression form");
85
Contracts.CheckParam(((
UnaryExpression
)expression.Body).Operand is MethodCallExpression, nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo3`4.cs (3)
60
if (!(expression is { Body:
UnaryExpression
{ Operand: MethodCallExpression methodCallExpression } }))
85
Contracts.CheckParam(expression.Body is
UnaryExpression
, nameof(expression), "Unexpected expression form");
86
Contracts.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)
581
UnaryExpression
convert = Expression.Convert(resultMO.Expression, binder.ReturnType);
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (2)
47
AddressOf((
UnaryExpression
)node, type);
207
private void AddressOf(
UnaryExpression
node, Type type)
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (1)
98
EmitThrow((
UnaryExpression
)node, CompilationFlags.EmitAsVoidType);
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (4)
463
EmitBranchNot(branchValue, (
UnaryExpression
)node, label);
494
private void EmitBranchNot(bool branch,
UnaryExpression
node, Label label)
572
var
convert = (
UnaryExpression
)expression;
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (12)
16
EmitQuote((
UnaryExpression
)expr);
20
private void EmitQuote(
UnaryExpression
quote)
41
EmitThrow((
UnaryExpression
)expr, CompilationFlags.EmitAsDefaultType);
44
private void EmitThrow(
UnaryExpression
expr, CompilationFlags flags)
63
EmitUnary((
UnaryExpression
)expr, flags);
66
private void EmitUnary(
UnaryExpression
node, CompilationFlags flags)
273
var
node = (
UnaryExpression
)expr;
283
EmitConvert((
UnaryExpression
)expr, flags);
286
private void EmitConvert(
UnaryExpression
node, CompilationFlags flags)
316
UnaryExpression
operand = Expression.Convert(node.Operand, paramType);
350
private void EmitUnaryMethod(
UnaryExpression
node, CompilationFlags flags)
System\Linq\Expressions\Compiler\StackSpiller.cs (4)
577
var
node = (
UnaryExpression
)expr;
603
var
node = (
UnaryExpression
)expr;
System\Linq\Expressions\Compiler\VariableBinder.cs (1)
69
protected internal override Expression VisitUnary(
UnaryExpression
node)
System\Linq\Expressions\DebugViewWriter.cs (1)
877
protected internal override Expression VisitUnary(
UnaryExpression
node)
System\Linq\Expressions\Expression.DebuggerProxy.cs (2)
475
private readonly
UnaryExpression
_node;
477
public UnaryExpressionProxy(
UnaryExpression
node)
System\Linq\Expressions\ExpressionStringBuilder.cs (1)
600
protected internal override Expression VisitUnary(
UnaryExpression
node)
System\Linq\Expressions\ExpressionVisitor.cs (5)
533
/// Visits the children of the <see cref="
UnaryExpression
"/>.
538
protected internal virtual Expression VisitUnary(
UnaryExpression
node)
639
private static
UnaryExpression
ValidateUnary(
UnaryExpression
before,
UnaryExpression
after)
System\Linq\Expressions\Interpreter\LightCompiler.cs (14)
1036
var
node = (
UnaryExpression
)expr;
1219
private void CompileNotExpression(
UnaryExpression
node)
1227
var
node = (
UnaryExpression
)expr;
1277
private void EmitUnaryMethodCall(
UnaryExpression
node)
1299
private void EmitUnaryBoolCheck(
UnaryExpression
node)
1934
var
node = (
UnaryExpression
)expr;
2770
var
unary = (
UnaryExpression
)expr;
2888
var
node = (
UnaryExpression
)expr;
2915
private void CompileTypeAsExpression(
UnaryExpression
node)
System\Linq\Expressions\InvocationExpression.cs (1)
117
? (LambdaExpression)((
UnaryExpression
)Expression).Operand
System\Linq\Expressions\UnaryExpression.cs (169)
136
private
UnaryExpression
FunctionalOp(Expression operand)
282
public
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>
303
public 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>
318
public static
UnaryExpression
MakeUnary(ExpressionType unaryType, Expression operand, Type type, MethodInfo? method) =>
344
private static
UnaryExpression
GetUserDefinedUnaryOperatorOrThrow(ExpressionType unaryType, string name, Expression operand)
346
UnaryExpression
? u = GetUserDefinedUnaryOperator(unaryType, name, 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)
405
UnaryExpression
? u = GetUserDefinedCoercion(coercionType, expression, 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)
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>
457
public 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>
471
public 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>
492
public 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>
506
public 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>
525
public 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>
540
public 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>
560
public 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>
575
public static
UnaryExpression
Not(Expression expression, MethodInfo? method)
584
UnaryExpression
? u = GetUserDefinedUnaryOperator(ExpressionType.Not, "op_LogicalNot", expression);
598
/// <returns>An instance of <see cref="
UnaryExpression
"/>.</returns>
599
public static
UnaryExpression
IsFalse(Expression expression)
609
/// <returns>An instance of <see cref="
UnaryExpression
"/>.</returns>
610
public static
UnaryExpression
IsFalse(Expression expression, MethodInfo? method)
628
/// <returns>An instance of <see cref="
UnaryExpression
"/>.</returns>
629
public static
UnaryExpression
IsTrue(Expression expression)
639
/// <returns>An instance of <see cref="
UnaryExpression
"/>.</returns>
640
public static
UnaryExpression
IsTrue(Expression expression, MethodInfo? method)
658
/// <returns>An instance of <see cref="
UnaryExpression
"/>.</returns>
659
public static
UnaryExpression
OnesComplement(Expression expression)
669
/// <returns>An instance of <see cref="
UnaryExpression
"/>.</returns>
670
public 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>
690
public 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>
709
public 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>
729
public 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>
745
public 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>
769
public 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>
785
public 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>
812
public 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>
833
public 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>
849
public 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>
859
public 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>
869
public 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>
880
public 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>
897
public 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>
908
public 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>
927
public 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>
938
public 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>
958
public 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>
970
public 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>
981
public 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>
993
public 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>
1004
public 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>
1016
public 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>
1027
public 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>
1039
public static
UnaryExpression
PostDecrementAssign(Expression expression, MethodInfo? method)
1044
private static
UnaryExpression
MakeOpAssignUnary(ExpressionType kind, Expression expression, MethodInfo? method)
1049
UnaryExpression
result;
System.Linq.Queryable (2)
System\Linq\EnumerableRewriter.cs (2)
100
expr = ((
UnaryExpression
)expr).Operand;
350
arg = ((
UnaryExpression
)arg).Operand;