206 references to Constant
Microsoft.AspNetCore.Components.Endpoints (7)
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (7)
47
Expression.Assign(succeeded, Expression.
Constant
(true)),
288
Expression.
Constant
(prefix));
298
Expression.
Constant
(message),
299
Expression.NewArrayInit(typeof(object), Expression.
Constant
(parameter)));
315
Expression.
Constant
(prefix));
554
Expression.Assign(foundValueParam, Expression.
Constant
(false)),
555
Expression.Assign(succeeded, Expression.
Constant
(true)),
Microsoft.AspNetCore.Http.Extensions (69)
RequestDelegateFactory.cs (49)
107
private static readonly BinaryExpression TempSourceStringNotNullExpr = Expression.NotEqual(TempSourceStringExpr, Expression.
Constant
(null));
108
private static readonly BinaryExpression TempSourceStringNullExpr = Expression.Equal(TempSourceStringExpr, Expression.
Constant
(null));
449
contextArgAccess[i] = Expression.Call(FilterContextExpr, EndpointFilterInvocationContextGetArgument.MakeGenericMethod(argTypes[i]), Expression.
Constant
(i));
455
Expression.Property(FilterContextArgumentsExpr, ListIndexer, Expression.
Constant
(i)),
474
Expression.GreaterThanOrEqual(FilterContextHttpContextStatusCodeExpr, Expression.
Constant
(400)),
999
Expression.Assign(StatusCodeExpr, Expression.
Constant
(400))),
1016
Expression.Assign(StatusCodeExpr, Expression.
Constant
(400)),
1554
var indexArguments = new[] { Expression.
Constant
(key) };
1651
Expression.
Constant
(key),
1655
Expression.
Constant
(key),
1670
var parameterTypeNameConstant = Expression.
Constant
(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false));
1671
var parameterNameConstant = Expression.
Constant
(parameter.Name);
1672
var sourceConstant = Expression.
Constant
(source);
1755
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
1760
var tryParseCall = tryParseMethodCall(parsedValue, Expression.
Constant
(CultureInfo.InvariantCulture));
1773
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
1809
Expression.Assign(index, Expression.
Constant
(0)),
1840
Expression.NotEqual(stringArrayExpr!, Expression.
Constant
(null)),
1853
Expression.NotEqual(stringArrayExpr!, Expression.
Constant
(null)),
1897
var parameterTypeNameConstant = Expression.
Constant
(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false));
1898
var parameterNameConstant = Expression.
Constant
(parameter.Name);
1899
var sourceConstant = Expression.
Constant
(source);
1913
Expression.IfThen(Expression.Equal(argument, Expression.
Constant
(null)),
1915
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
1937
Expression.Condition(Expression.Equal(valueExpression, Expression.Convert(Expression.
Constant
(StringValues.Empty), parameter.ParameterType)),
1938
Expression.Convert(Expression.
Constant
(null), parameter.ParameterType),
1953
Expression.Condition(Expression.NotEqual(valueExpression, Expression.
Constant
(null)),
1955
Expression.Convert(Expression.
Constant
(parameter.DefaultValue), parameter.ParameterType)));
1997
Expression.Equal(boundValueExpr, Expression.
Constant
(null)),
1999
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
2002
Expression.
Constant
(typeName),
2003
Expression.
Constant
(parameter.Name),
2004
Expression.
Constant
(message),
2145
Expression.
Constant
(CultureInfo.InvariantCulture),
2146
Expression.Call(AsMemoryMethod, formBuffer, Expression.
Constant
(0), Expression.Constant(formDataMapperOptions.MaxKeyBufferSize)),
2165
Expression.
Constant
(false));
2167
Expression.NotEqual(formBuffer, Expression.
Constant
(null)),
2170
var parameterTypeNameConstant = Expression.
Constant
(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false));
2171
var parameterNameConstant = Expression.
Constant
(parameter.Name);
2204
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
2301
Expression.Equal(BodyValueExpr, Expression.
Constant
(null)),
2303
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
2306
Expression.
Constant
(parameter.Name),
2325
Expression.Equal(BodyValueExpr, Expression.
Constant
(null)),
2327
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
2330
Expression.
Constant
(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false)),
2331
Expression.
Constant
(parameter.Name),
2332
Expression.
Constant
("body"),
2344
Expression.Coalesce(BodyValueExpr, Expression.
Constant
(parameter.DefaultValue)),
src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (7)
47
Expression.Assign(succeeded, Expression.
Constant
(true)),
288
Expression.
Constant
(prefix));
298
Expression.
Constant
(message),
299
Expression.NewArrayInit(typeof(object), Expression.
Constant
(parameter)));
315
Expression.
Constant
(prefix));
554
Expression.Assign(foundValueParam, Expression.
Constant
(false)),
555
Expression.Assign(succeeded, Expression.
Constant
(true)),
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (7)
209
var valueObj = Expression.ArrayIndex(parametersParameter, Expression.
Constant
(i));
261
var valueObj = Expression.ArrayIndex(parametersParameter, Expression.
Constant
(i));
313
Expression.
Constant
(null)
376
Expression.
Constant
(getAwaiterFunc),
377
Expression.
Constant
(isCompletedFunc),
378
Expression.
Constant
(getResultFunc),
379
Expression.
Constant
(onCompletedFunc),
src\Shared\ParameterBindingMethodCache.cs (6)
115
Expression.Assign(success, Expression.Call(_enumTryParseMethod, Expression.
Constant
(type), TempSourceStringExpr, enumAsObject)),
128
Expression.
Constant
(UriKind.RelativeOrAbsolute),
158
Expression.
Constant
(dateTimeStyles),
167
Expression.
Constant
(numberStyle),
252
typedCall = Expression.Call(methodInfo, HttpContextExpr, Expression.
Constant
(parameter));
273
typedCall = Expression.Call(methodInfo, HttpContextExpr, Expression.
Constant
(parameter));
Microsoft.AspNetCore.Http.Extensions.Tests (7)
ParameterBindingMethodCacheTests.cs (7)
33
var call = methodFound!(Expression.Variable(type, "parsedValue"), Expression.
Constant
(CultureInfo.InvariantCulture)) as MethodCallExpression;
51
var call = methodFound!(Expression.Variable(typeof(Uri), "parsedValue"), Expression.
Constant
(UriKind.RelativeOrAbsolute)) as MethodCallExpression;
73
var call = methodFound!(Expression.Variable(type, "parsedValue"), Expression.
Constant
(CultureInfo.InvariantCulture)) as MethodCallExpression;
105
var call = methodFound!(Expression.Variable(type, "parsedValue"), Expression.
Constant
(CultureInfo.InvariantCulture)) as MethodCallExpression;
129
var call = methodFound!(Expression.Variable(type, "parsedValue"), Expression.
Constant
(CultureInfo.InvariantCulture)) as MethodCallExpression;
183
var call = methodFound!(Expression.Variable(type, "parsedValue"), Expression.
Constant
(CultureInfo.InvariantCulture)) as MethodCallExpression;
205
var block = methodFound!(parsedValue, Expression.
Constant
(CultureInfo.InvariantCulture)) as BlockExpression;
Microsoft.AspNetCore.Mvc.Abstractions (6)
src\Shared\ParameterBindingMethodCache.cs (6)
115
Expression.Assign(success, Expression.Call(_enumTryParseMethod, Expression.
Constant
(type), TempSourceStringExpr, enumAsObject)),
128
Expression.
Constant
(UriKind.RelativeOrAbsolute),
158
Expression.
Constant
(dateTimeStyles),
167
Expression.
Constant
(numberStyle),
252
typedCall = Expression.Call(methodInfo, HttpContextExpr, Expression.
Constant
(parameter));
273
typedCall = Expression.Call(methodInfo, HttpContextExpr, Expression.
Constant
(parameter));
Microsoft.AspNetCore.Mvc.Core (10)
ModelBinding\Binders\TryParseModelBinder.cs (1)
136
Expression.Call(AddModelErrorMethod, BindingContextExpression, Expression.
Constant
(new FormatException()))),
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (2)
276
constructorArguments[i] = Expression.ArrayAccess(factoryArgumentArray, Expression.
Constant
(i));
288
var defaultValueExpression = Expression.
Constant
(defaultValue);
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (7)
209
var valueObj = Expression.ArrayIndex(parametersParameter, Expression.
Constant
(i));
261
var valueObj = Expression.ArrayIndex(parametersParameter, Expression.
Constant
(i));
313
Expression.
Constant
(null)
376
Expression.
Constant
(getAwaiterFunc),
377
Expression.
Constant
(isCompletedFunc),
378
Expression.
Constant
(getResultFunc),
379
Expression.
Constant
(onCompletedFunc),
Microsoft.AspNetCore.Mvc.Razor (1)
Compilation\DefaultRazorPageFactoryProvider.cs (1)
49
var propertyBindExpression = Expression.Bind(pathProperty, Expression.
Constant
(viewDescriptor.RelativePath));
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\ExecutorFactory.cs (1)
60
Expression.ArrayIndex(arguments, Expression.
Constant
(i)),
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
CachedExpressionCompiler.cs (1)
13
private static readonly Expression NullExpression = Expression.
Constant
(value: null);
Microsoft.AspNetCore.OpenApi (13)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (7)
209
var valueObj = Expression.ArrayIndex(parametersParameter, Expression.
Constant
(i));
261
var valueObj = Expression.ArrayIndex(parametersParameter, Expression.
Constant
(i));
313
Expression.
Constant
(null)
376
Expression.
Constant
(getAwaiterFunc),
377
Expression.
Constant
(isCompletedFunc),
378
Expression.
Constant
(getResultFunc),
379
Expression.
Constant
(onCompletedFunc),
src\Shared\ParameterBindingMethodCache.cs (6)
115
Expression.Assign(success, Expression.Call(_enumTryParseMethod, Expression.
Constant
(type), TempSourceStringExpr, enumAsObject)),
128
Expression.
Constant
(UriKind.RelativeOrAbsolute),
158
Expression.
Constant
(dateTimeStyles),
167
Expression.
Constant
(numberStyle),
252
typedCall = Expression.Call(methodInfo, HttpContextExpr, Expression.
Constant
(parameter));
273
typedCall = Expression.Call(methodInfo, HttpContextExpr, Expression.
Constant
(parameter));
Microsoft.AspNetCore.Shared.Tests (7)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (7)
209
var valueObj = Expression.ArrayIndex(parametersParameter, Expression.
Constant
(i));
261
var valueObj = Expression.ArrayIndex(parametersParameter, Expression.
Constant
(i));
313
Expression.
Constant
(null)
376
Expression.
Constant
(getAwaiterFunc),
377
Expression.
Constant
(isCompletedFunc),
378
Expression.
Constant
(getResultFunc),
379
Expression.
Constant
(onCompletedFunc),
Microsoft.AspNetCore.SignalR.Core (7)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (7)
209
var valueObj = Expression.ArrayIndex(parametersParameter, Expression.
Constant
(i));
261
var valueObj = Expression.ArrayIndex(parametersParameter, Expression.
Constant
(i));
313
Expression.
Constant
(null)
376
Expression.
Constant
(getAwaiterFunc),
377
Expression.
Constant
(isCompletedFunc),
378
Expression.
Constant
(getResultFunc),
379
Expression.
Constant
(onCompletedFunc),
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (1)
138
Expression.
Constant
(e.Message)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (7)
HelperFactory.cs (7)
144
invokeExpression = Expression.Call(Expression.
Constant
(instance), method, parameterExpressions);
188
invokeExpression = Expression.Call(Expression.
Constant
(instance), method, parameterExpressions);
280
return Expression.Convert(Expression.Call(ConvertChangeType, input, Expression.
Constant
(output)), output);
299
return Expression.Condition(input, Expression.
Constant
("true"), Expression.
Constant
(""));
316
var element = Expression.ArrayIndex(argumentsParameter, Expression.
Constant
(index));
325
result = Expression.Call(EnumerableSkip(typeof(object)), result, Expression.
Constant
(index));
Microsoft.Extensions.DependencyInjection (5)
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (5)
98
return Expression.
Constant
(CallSiteRuntimeResolver.Instance.Resolve(singletonCallSite, _rootScope));
103
return Expression.
Constant
(constantCallSite.DefaultValue);
113
return Expression.Invoke(Expression.
Constant
(factoryCallSite.Factory), ScopeParameter);
138
return Expression.
Constant
(
210
return Expression.Invoke(Expression.
Constant
(lambda), ScopeParameter);
Microsoft.Extensions.DependencyInjection.Abstractions (5)
ActivatorUtilities.cs (5)
412
constructorArguments[i] = Expression.ArrayAccess(factoryArgumentArray, Expression.
Constant
(parameterMap[i]));
420
Expression.
Constant
(hasDefaultValue),
429
ConstantExpression? defaultValueExpression = Expression.
Constant
(defaultValue);
436
return Expression.Block(Expression.IfThen(Expression.Equal(serviceProvider, Expression.
Constant
(null)), Expression.Throw(Expression.
Constant
(new ArgumentNullException(nameof(serviceProvider))))),
Microsoft.VisualBasic.Core (12)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (12)
408
Expression.
Constant
(Name),
500
Expression.
Constant
(_lateCall)
569
Expression.
Constant
(_reportErrors)
638
Expression.
Constant
(_reportErrors)
694
Expression.
Constant
(Name),
751
Expression.
Constant
(Name),
753
Expression.
Constant
(_optimisticSet),
754
Expression.
Constant
(_rValueBase)
793
Return New DynamicMetaObject(Expression.
Constant
(IDOBinder.missingMemberSentinel), IDOUtils.CreateRestrictions(target))
1084
Expression.
Constant
(_optimisticSet),
1085
Expression.
Constant
(_rValueBase)
1311
writeback.Add(Expression.Assign(arg, Expression.ArrayIndex(array, Expression.
Constant
(i))))
PresentationFramework-SystemCore (1)
DynamicAccessorImpl.cs (1)
238
Expression.
Constant
(message)
System.ComponentModel.Composition (6)
System\ComponentModel\Composition\ConstraintServices.cs (6)
133
Expression.
Constant
(constantKey));
160
Expression.
Constant
(constantKey))
178
Expression.
Constant
(constantValue),
183
Expression.
Constant
(metadataName)));
197
Expression.
Constant
(CompositionConstants.ProductDefinitionMetadataName));
203
Expression.
Constant
(CompositionConstants.ProductDefinitionMetadataName));
System.Composition.TypedParts (3)
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
91
Expression.
Constant
(d.Value.Target.GetDescriptor().Activator),
System\Composition\TypedParts\Discovery\DiscoveredPart.cs (1)
187
Expression.Convert(Expression.Call(Expression.
Constant
(a), s_activatorInvoke, contextParam, operationParm), pi.ParameterType);
System\Composition\TypedParts\Discovery\DiscoveredPropertyExport.cs (1)
29
Expression.Convert(Expression.Call(Expression.
Constant
(partActivator), s_activatorInvoke, args), _property.DeclaringType),
System.Linq.Expressions (21)
System\Dynamic\DynamicObject.cs (2)
615
Expression.
Constant
(convertFailed),
620
Expression.
Constant
("null"),
System\Dynamic\ExpandoObject.cs (3)
797
Expression.
Constant
(name),
871
Expression.
Constant
(binder.Name),
890
Expression.
Constant
(binder.Name),
System\Linq\Expressions\Compiler\LambdaCompiler.cs (1)
291
return Utils.GetStrongBoxValueField(Expression.
Constant
(new StrongBox<T>()));
System\Linq\Expressions\DynamicExpression.cs (1)
43
var site = Expression.
Constant
(CallSite.Create(DelegateType, Binder));
System\Linq\Expressions\Interpreter\TypeOperations.cs (3)
611
Expression.
Constant
(new Func<IRuntimeVariables, IRuntimeVariables, int[], IRuntimeVariables>(MergeRuntimeVariables)),
614
Expression.
Constant
(indexes)
630
return Expression.Convert(Utils.GetStrongBoxValueField(Expression.
Constant
(box)), node.Type);
System\Linq\Expressions\Utils.cs (9)
33
private static readonly ConstantExpression s_true = Expression.
Constant
(BoxedTrue);
34
private static readonly ConstantExpression s_false = Expression.
Constant
(BoxedFalse);
36
private static readonly ConstantExpression s_m1 = Expression.
Constant
(BoxedIntM1);
37
private static readonly ConstantExpression s_0 = Expression.
Constant
(BoxedInt0);
38
private static readonly ConstantExpression s_1 = Expression.
Constant
(BoxedInt1);
39
private static readonly ConstantExpression s_2 = Expression.
Constant
(BoxedInt2);
40
private static readonly ConstantExpression s_3 = Expression.
Constant
(BoxedInt3);
43
public static readonly ConstantExpression Null = Expression.
Constant
(null);
55
_ => Expression.
Constant
(value),
System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs (2)
169
Expression.
Constant
(indexes)
180
return Utils.GetStrongBoxValueField(Expression.
Constant
(box));
System.Linq.Queryable (16)
System\Linq\EnumerableQuery.cs (1)
47
_expression = Expression.
Constant
(this);
System\Linq\Queryable.cs (15)
504
source.Expression, Expression.
Constant
(count)));
522
source.Expression, Expression.
Constant
(range)));
560
source.Expression, Expression.
Constant
(count)));
786
source.Expression, Expression.
Constant
(size)));
1383
source.Expression, Expression.
Constant
(index)));
1405
source.Expression, Expression.
Constant
(index)));
1417
source.Expression, Expression.
Constant
(index)));
1435
source.Expression, Expression.
Constant
(index)));
2339
source.Expression, Expression.
Constant
(seed), Expression.Quote(func)));
2353
source.Expression, Expression.
Constant
(seed), Expression.Quote(func), Expression.Quote(selector)));
2383
source.Expression, Expression.Quote(keySelector), Expression.
Constant
(seed), Expression.Quote(func), Expression.Constant(keyComparer, typeof(IEqualityComparer<TKey>))));
2426
source.Expression, Expression.
Constant
(count)
2439
source.Expression, Expression.
Constant
(count)));
2451
source.Expression, Expression.
Constant
(element)));
2463
source.Expression, Expression.
Constant
(element)));