121 references to Body
Microsoft.AspNetCore.Components.Forms (2)
FieldIdentifier.cs (1)
97var accessorBody = accessor.Body;
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
41var node = expression.Body;
Microsoft.AspNetCore.Components.Forms.Tests (1)
FieldIdentifierTest.cs (1)
152var body = expression.Body as MemberExpression;
Microsoft.AspNetCore.Components.QuickGrid (2)
Columns\GridSort.cs (1)
138if (expression.Body is not MemberExpression body)
Columns\PropertyColumn.cs (1)
71if (Title is null && Property.Body is MemberExpression memberExpression)
Microsoft.AspNetCore.Components.Web (1)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
41var node = expression.Body;
Microsoft.AspNetCore.Http.Extensions (2)
RequestDelegateFactory.cs (2)
2372var mc = (MethodCallExpression)expr.Body; 2378var mc = (MemberExpression)expr.Body;
Microsoft.AspNetCore.Http.Extensions.Tests (2)
ParameterBindingMethodCacheTests.cs (2)
754var mc = (MethodCallExpression)expr.Body; 760var mc = (MethodCallExpression)expr.Body;
Microsoft.AspNetCore.Http.Results.Tests (1)
ResultsTests.cs (1)
1709var testedMethods = new HashSet<string>(FactoryMethodsTuples.Select(t => GetMemberName(t.Item1.Body)));
Microsoft.AspNetCore.JsonPatch (1)
JsonPatchDocumentOfT.cs (1)
662var segments = GetPathSegments(expr.Body);
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\ModelBindingHelper.cs (2)
337var orWrapperExpression = firstExpression.Body; 352var propertyName = GetPropertyName(expression.Body);
Microsoft.AspNetCore.Mvc.Core.Test (11)
ModelBinding\ModelBindingHelperTest.cs (11)
342var propertyName = ModelBindingHelper.GetPropertyName(expression.Body); 356ModelBindingHelper.GetPropertyName(expression.Body)); 362expression.Body.NodeType), 397ModelBindingHelper.GetPropertyName(expression.Body)); 400$"The passed expression of expression node type '{expression.Body.NodeType}' is invalid." + 416ModelBindingHelper.GetPropertyName(expression.Body)); 419$"The passed expression of expression node type '{expression.Body.NodeType}' is invalid." + 432ModelBindingHelper.GetPropertyName(expression.Body)); 435$"The passed expression of expression node type '{expression.Body.NodeType}' is invalid." + 448ModelBindingHelper.GetPropertyName(expression.Body)); 451$"The passed expression of expression node type '{expression.Body.NodeType}' is invalid." +
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
CachedExpressionCompiler.cs (2)
47switch (expression.Body) 212var body = expression.Body;
ExpressionHelper.cs (2)
46var part = expression.Body; 141part = expression.Body;
ExpressionMetadataProvider.cs (3)
29switch (expression.Body.NodeType) 39legalExpression = ExpressionHelper.IsSingleArgumentIndexer(expression.Body); 44var memberExpression = (MemberExpression)expression.Body;
LambdaExpressionComparer.cs (3)
22var expression1 = lambdaExpression1.Body; 23var expression2 = lambdaExpression2.Body; 83var expression = lambdaExpression.Body;
ModelStateDictionaryExtensions.cs (1)
152var unaryExpression = expression.Body as UnaryExpression;
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
MemberExpressionCacheKeyComparerTest.cs (1)
192var memberExpression = Assert.IsAssignableFrom<MemberExpression>(expression.Body);
MemberExpressionCacheKeyTest.cs (1)
72var memberExpression = Assert.IsAssignableFrom<MemberExpression>(expression.Body);
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
ExpressionTrees\Sources\ExprLambdaUtils.vb (1)
259Visit(node.Body)
Microsoft.DotNet.Build.Tasks.Packaging (2)
Extensions.cs (2)
147var memberSelectorExpression = memberLamda.Body as MemberExpression; 169var memberSelectorExpression = memberLamda.Body as MemberExpression;
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");
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
PropertyChangedTestMonitor.vb (1)
27Dim propertyName = DirectCast(expectation.Body, MemberExpression).Member.Name
System.ComponentModel.Composition (2)
System\ComponentModel\Composition\ConstraintServices.cs (1)
216baseConstraint.Body,
System\ComponentModel\Composition\Primitives\ImportDefinition.cs (1)
279return Constraint.Body.ToString();
System.ComponentModel.Composition.Registration (2)
System\ComponentModel\Composition\Registration\PartBuilderOfT.cs (2)
49Expression expr = Reduce(propertyFilter).Body; 104Expression expr = Reduce(constructorFilter).Body;
System.Composition.Convention (3)
System\Composition\Convention\PartConventionBuilderOfT.cs (3)
37Expression expr = Reduce(methodSelector).Body; 108Expression expr = Reduce(propertySelector).Body; 167Expression expr = Reduce(constructorSelector).Body;
System.Linq.Expressions (54)
System\Linq\Expressions\Compiler\LambdaCompiler.ControlFlow.cs (1)
245Expression expression = lambda.Body;
System\Linq\Expressions\Compiler\LambdaCompiler.Lambda.cs (2)
228EmitExpressionAsVoid(_lambda.Body, flags); 232EmitExpression(_lambda.Body, flags);
System\Linq\Expressions\Compiler\StackSpiller.cs (1)
106Result body = RewriteExpressionFreeTemps(lambda.Body, _startingStack);
System\Linq\Expressions\Compiler\VariableBinder.cs (1)
154body = new ReadOnlyCollection<Expression>(new[] { lambda.Body });
System\Linq\Expressions\DebugViewWriter.cs (1)
1176Visit(lambda.Body);
System\Linq\Expressions\Expression.DebuggerProxy.cs (1)
227public Expression Body => _node.Body;
System\Linq\Expressions\ExpressionStringBuilder.cs (1)
318Visit(node.Body);
System\Linq\Expressions\ExpressionVisitor.cs (2)
346Expression body = Visit(node.Body); 349if (body == node.Body && parameters == null)
System\Linq\Expressions\Interpreter\LightCompiler.cs (2)
321Compile(node.Body); 324if (node.Body.Type != typeof(void) && node.ReturnType == typeof(void))
System\Linq\Expressions\Interpreter\TypeOperations.cs (2)
526Expression? b = Visit(node.Body); 531if (b == node.Body)
System\Linq\Expressions\LambdaExpression.cs (38)
250/// <param name="body">The <see cref="LambdaExpression.Body" /> property of the result.</param> 255if (body == Body) 648/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 660/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 673/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 685/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 698/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 711/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 733/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 745/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 758/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 770/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 783/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 795/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 808/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 820/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 833/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 846/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 884/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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> 901/// <param name="body">An <see cref="Expression"/> to set the <see cref="LambdaExpression.Body"/> property equal to.</param> 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\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs (2)
81Expression b = Visit(node.Body); 86if (b == node.Body)