1 write to Method
System.Linq.Expressions (1)
System\Linq\Expressions\UnaryExpression.cs (1)
21Method = method;
42 references to Method
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (3)
ExpressionTrees\Sources\ExprLambdaUtils.vb (3)
327If node.Method IsNot Nothing Then 328_s.AppendLine(indent + "method: " + node.Method.ToString() + " in " + node.Method.DeclaringType.ToString())
System.Linq.Expressions (39)
System\Dynamic\DynamicObject.cs (1)
583Debug.Assert(convert.Method == null);
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (1)
496if (node.Method != null)
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (8)
68if (node.Method != null) 288if (node.Method != null) 308ParameterInfo[] pis = node.Method.GetParametersCached(); 317Debug.Assert(operand.Method == null); 319node = Expression.Convert(Expression.Call(node.Method, operand), node.Type); 321Debug.Assert(node.Method == null); 355MethodCallExpression mc = Expression.Call(node.Method!, v); 363EmitMethodCallExpression(Expression.Call(node.Method!, node.Operand), flags);
System\Linq\Expressions\Compiler\StackSpiller.cs (2)
613RequireNoRefArgs(node.Method); 618expr = new UnaryExpression(node.NodeType, expression.Node, node.Type, node.Method);
System\Linq\Expressions\Expression.DebuggerProxy.cs (1)
487public MethodInfo? Method => _node.Method;
System\Linq\Expressions\ExpressionVisitor.cs (3)
641if (before != after && before.Method == null) 643if (after.Method != null) 645throw Error.MustRewriteWithoutMethod(after.Method, nameof(VisitUnary));
System\Linq\Expressions\Interpreter\LightCompiler.cs (5)
1037if (node.Method != null) 1041MethodInfo method = node.Method; 1229if (node.Method != null) 1289_instructions.EmitCall(node.Method!); 1295_instructions.EmitCall(node.Method!);
System\Linq\Expressions\UnaryExpression.cs (18)
64if (Method != null) 66return (operandIsNullable && !TypeUtils.AreEquivalent(Method.GetParametersCached()[0].ParameterType, Operand.Type)) || 67(resultIsNullable && !TypeUtils.AreEquivalent(Method.ReturnType, this.Type)); 148return new UnaryExpression(functional, operand, operand.Type, Method); 288return Expression.MakeUnary(NodeType, operand, Type, Method); 349ValidateParamsWithOperandsOrThrow(u.Method!.GetParametersCached()[0].ParameterType, operand.Type, unaryType, name); 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> 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> 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> 533/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 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> 568/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 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> 738/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param> 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> 778/// <param name="method">A <see cref="MethodInfo"/> to set the <see cref="UnaryExpression.Method"/> property equal to.</param>