232 references to Constant
Microsoft.AspNetCore.Components.Endpoints (13)
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (13)
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));
380
Expression.
Constant
(property.Name)),
390
Expression.
Constant
(property.Type),
399
Expression.
Constant
(property.Name)),
484
Expression.
Constant
(constructorParameter.Name)),
493
Expression.
Constant
(constructorParameter.Type),
502
Expression.
Constant
(constructorParameter.Name)),
554
Expression.Assign(foundValueParam, Expression.
Constant
(false)),
555
Expression.Assign(succeeded, Expression.
Constant
(true)),
Microsoft.AspNetCore.Http.Extensions (86)
RequestDelegateFactory.cs (60)
108
private static readonly BinaryExpression TempSourceStringNotNullExpr = Expression.NotEqual(TempSourceStringExpr, Expression.
Constant
(null));
109
private static readonly BinaryExpression TempSourceStringNullExpr = Expression.Equal(TempSourceStringExpr, Expression.
Constant
(null));
458
contextArgAccess[i] = Expression.Call(FilterContextExpr, EndpointFilterInvocationContextGetArgument.MakeGenericMethod(argTypes[i]), Expression.
Constant
(i));
464
Expression.Property(FilterContextArgumentsExpr, ListIndexer, Expression.
Constant
(i)),
483
Expression.GreaterThanOrEqual(FilterContextHttpContextStatusCodeExpr, Expression.
Constant
(400)),
1008
Expression.Assign(StatusCodeExpr, Expression.
Constant
(400))),
1025
Expression.Assign(StatusCodeExpr, Expression.
Constant
(400)),
1566
var indexArguments = new[] { Expression.
Constant
(key) };
1663
Expression.
Constant
(key),
1667
Expression.
Constant
(key),
1682
var parameterTypeNameConstant = Expression.
Constant
(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false));
1683
var parameterNameConstant = Expression.
Constant
(parameter.Name);
1684
var sourceConstant = Expression.
Constant
(source);
1767
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
1770
TempSourceStringExpr, Expression.
Constant
(factoryContext.ThrowOnBadRequest)));
1772
var tryParseCall = tryParseMethodCall(parsedValue, Expression.
Constant
(CultureInfo.InvariantCulture));
1785
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
1788
Expression.
Constant
(factoryContext.ThrowOnBadRequest))
1821
Expression.Assign(index, Expression.
Constant
(0)),
1852
Expression.NotEqual(stringArrayExpr!, Expression.
Constant
(null)),
1865
Expression.NotEqual(stringArrayExpr!, Expression.
Constant
(null)),
1909
var parameterTypeNameConstant = Expression.
Constant
(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false));
1910
var parameterNameConstant = Expression.
Constant
(parameter.Name);
1911
var sourceConstant = Expression.
Constant
(source);
1925
Expression.IfThen(Expression.Equal(argument, Expression.
Constant
(null)),
1927
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
1930
Expression.
Constant
(factoryContext.ThrowOnBadRequest))
1949
Expression.Condition(Expression.Equal(valueExpression, Expression.Convert(Expression.
Constant
(StringValues.Empty), parameter.ParameterType)),
1950
Expression.Convert(Expression.
Constant
(null), parameter.ParameterType),
1965
Expression.Condition(Expression.NotEqual(valueExpression, Expression.
Constant
(null)),
1973
? Expression.Call(GetHeaderSplitMethod, property, Expression.
Constant
(key))
2035
var boundValueExpr = Expression.ArrayIndex(BoundValuesArrayExpr, Expression.
Constant
(factoryContext.ParameterBinders.Count - 1));
2043
Expression.Equal(boundValueExpr, Expression.
Constant
(null)),
2045
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
2048
Expression.
Constant
(typeName),
2049
Expression.
Constant
(parameter.Name),
2050
Expression.
Constant
(message),
2051
Expression.
Constant
(factoryContext.ThrowOnBadRequest))
2185
var processFormExpr = Expression.Call(ProcessFormMethod, FormExpr, Expression.
Constant
(formDataMapperOptions.MaxKeyBufferSize), formDict, formBuffer);
2191
Expression.
Constant
(CultureInfo.InvariantCulture),
2192
Expression.Call(AsMemoryMethod, formBuffer, Expression.
Constant
(0), Expression.
Constant
(formDataMapperOptions.MaxKeyBufferSize)),
2197
Expression.
Constant
(formDataMapperOptions.MaxRecursionDepth));
2202
Expression.
Constant
(formDataMapperOptions));
2211
Expression.
Constant
(false));
2213
Expression.NotEqual(formBuffer, Expression.
Constant
(null)),
2216
var parameterTypeNameConstant = Expression.
Constant
(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false));
2217
var parameterNameConstant = Expression.
Constant
(parameter.Name);
2250
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
2257
Expression.
Constant
(factoryContext.ThrowOnBadRequest))
2347
Expression.Equal(BodyValueExpr, Expression.
Constant
(null)),
2349
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
2352
Expression.
Constant
(parameter.Name),
2353
Expression.
Constant
(factoryContext.ThrowOnBadRequest)
2371
Expression.Equal(BodyValueExpr, Expression.
Constant
(null)),
2373
Expression.Assign(WasParamCheckFailureExpr, Expression.
Constant
(true)),
2376
Expression.
Constant
(TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false)),
2377
Expression.
Constant
(parameter.Name),
2378
Expression.
Constant
("body"),
2379
Expression.
Constant
(factoryContext.ThrowOnBadRequest))
src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (13)
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));
380
Expression.
Constant
(property.Name)),
390
Expression.
Constant
(property.Type),
399
Expression.
Constant
(property.Name)),
484
Expression.
Constant
(constructorParameter.Name)),
493
Expression.
Constant
(constructorParameter.Type),
502
Expression.
Constant
(constructorParameter.Name)),
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)
139
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)
409
constructorArguments[i] = Expression.ArrayAccess(factoryArgumentArray, Expression.
Constant
(parameterMap[i]));
417
Expression.
Constant
(hasDefaultValue),
426
ConstantExpression? defaultValueExpression = Expression.
Constant
(defaultValue);
433
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)
237
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)
1158
source.Expression, Expression.
Constant
(count)));
1176
source.Expression, Expression.
Constant
(range)));
1214
source.Expression, Expression.
Constant
(count)));
1440
source.Expression, Expression.
Constant
(size)));
2037
source.Expression, Expression.
Constant
(index)));
2059
source.Expression, Expression.
Constant
(index)));
2071
source.Expression, Expression.
Constant
(index)));
2089
source.Expression, Expression.
Constant
(index)));
3059
source.Expression, Expression.
Constant
(seed), Expression.Quote(func)));
3073
source.Expression, Expression.
Constant
(seed), Expression.Quote(func), Expression.Quote(selector)));
3103
source.Expression, Expression.Quote(keySelector), Expression.
Constant
(seed), Expression.Quote(func), Expression.Constant(keyComparer, typeof(IEqualityComparer<TKey>))));
3146
source.Expression, Expression.
Constant
(count)
3159
source.Expression, Expression.
Constant
(count)));
3171
source.Expression, Expression.
Constant
(element)));
3183
source.Expression, Expression.
Constant
(element)));
System.ServiceModel.Primitives (3)
System\ServiceModel\Dispatcher\InvokerUtil.cs (3)
135
expressions.Add(Expression.Assign(variable, Expression.Convert(Expression.ArrayIndex(inputsParam, Expression.
Constant
(inputParameterCount)), variableType)));
174
Expression.ArrayAccess(outputsParam, Expression.
Constant
(j)),
180
Expression.ArrayAccess(outputsParam, Expression.
Constant
(j)),