128 references to Constant
Microsoft.AspNetCore.Components.Endpoints (12)
FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (12)
161Expression.Constant(null, typeof(string))), 162Expression.Assign(succeeded, Expression.Constant(false, typeof(bool))), 178Expression.Constant(null, resultParam.Type))); 203Expression.NotEqual(resultParam, Expression.Constant(null, resultParam.Type)), 218Expression.Constant(null, typeof(Action<string, object>))); 253Expression.Assign(succeeded, Expression.Constant(false, typeof(bool))))); 278Expression.Assign(succeeded, Expression.Constant(false, typeof(bool))))); 306Expression.Constant(null, typeof(string))); 408Expression.Constant(null, typeof(string))), 409Expression.Assign(succeeded, Expression.Constant(false, typeof(bool))) 511Expression.Constant(null, typeof(string))), 512Expression.Assign(succeeded, Expression.Constant(false, typeof(bool)))
Microsoft.AspNetCore.Http.Abstractions (3)
Extensions\UseMiddlewareExtensions.cs (3)
253parameterTypeExpression.Add(Expression.Constant(key, typeof(object))); 256parameterTypeExpression.Add(Expression.Constant(parameterType, typeof(Type))); 257parameterTypeExpression.Add(Expression.Constant(declaringType, typeof(Type)));
Microsoft.AspNetCore.Http.Extensions (25)
RequestDelegateFactory.cs (12)
1072Expression.Constant(factoryContext.JsonSerializerOptions.GetReadOnlyTypeInfo(typeof(object)), typeof(JsonTypeInfo<object>))); 1079Expression.Constant(factoryContext.JsonSerializerOptions.GetReadOnlyTypeInfo(typeof(object)), typeof(JsonTypeInfo<object>))); 1086Expression.Constant(factoryContext.JsonSerializerOptions.GetReadOnlyTypeInfo(typeof(object)), typeof(JsonTypeInfo<object>))); 1136Expression.Constant(factoryContext.JsonSerializerOptions.GetReadOnlyTypeInfo(typeof(object)), typeof(JsonTypeInfo<object>))); 1148Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(typeArg))); 1155Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(typeArg))); 1184Expression.Constant(factoryContext.JsonSerializerOptions.GetReadOnlyTypeInfo(typeof(object)), typeof(JsonTypeInfo<object>))); 1196Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(typeArg))); 1203Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(typeArg))); 1239Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(returnType))); 1247Expression.Constant(jsonTypeInfo, typeof(JsonTypeInfo<>).MakeGenericType(returnType))); 1793Expression.Constant(parameter.DefaultValue, parameter.ParameterType)));
src\Components\Endpoints\src\FormMapping\Factories\ComplexType\ComplexTypeExpressionConverterFactoryOfT.cs (12)
161Expression.Constant(null, typeof(string))), 162Expression.Assign(succeeded, Expression.Constant(false, typeof(bool))), 178Expression.Constant(null, resultParam.Type))); 203Expression.NotEqual(resultParam, Expression.Constant(null, resultParam.Type)), 218Expression.Constant(null, typeof(Action<string, object>))); 253Expression.Assign(succeeded, Expression.Constant(false, typeof(bool))))); 278Expression.Assign(succeeded, Expression.Constant(false, typeof(bool))))); 306Expression.Constant(null, typeof(string))); 408Expression.Constant(null, typeof(string))), 409Expression.Assign(succeeded, Expression.Constant(false, typeof(bool))) 511Expression.Constant(null, typeof(string))), 512Expression.Assign(succeeded, Expression.Constant(false, typeof(bool)))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
380Expression.Constant(unsafeOnCompletedFunc, typeof(Action<object, Action>)));
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
380Expression.Constant(unsafeOnCompletedFunc, typeof(Action<object, Action>)));
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
CachedExpressionCompiler.cs (1)
226Expression.Constant(value: null, body.Type),
Microsoft.AspNetCore.OpenApi (1)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
380Expression.Constant(unsafeOnCompletedFunc, typeof(Action<object, Action>)));
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
380Expression.Constant(unsafeOnCompletedFunc, typeof(Action<object, Action>)));
Microsoft.AspNetCore.SignalR.Core (1)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (1)
380Expression.Constant(unsafeOnCompletedFunc, typeof(Action<object, Action>)));
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
ExpressionTrees\Sources\QueryHelper.vb (1)
30Return System.Linq.Expressions.Expression.Constant(DirectCast(Nothing, QueryHelper(Of T)), GetType(QueryHelper(Of T)))
Microsoft.CSharp (3)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (1)
85Expression e = Expression.Equal(o.Expression, Expression.Constant(o.Value, o.Expression.Type));
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (1)
46System.Linq.Expressions.Expression.Constant(new DynamicBindingFailedException(), typeof(Exception)), typeof(object)), System.Dynamic.BindingRestrictions.Combine(v));
Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs (1)
479return Expression.Constant(
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
HelperFactory.cs (1)
288Expression.Constant(null, typeof(object)),
Microsoft.Extensions.DependencyInjection (3)
ServiceLookup\Expressions\ExpressionResolverBuilder.cs (3)
39private static readonly ConstantExpression CallSiteRuntimeResolverInstanceExpression = Expression.Constant( 216ConstantExpression callSiteExpression = Expression.Constant( 229ConstantExpression keyExpression = Expression.Constant(
Microsoft.Extensions.DependencyInjection.Abstractions (3)
ActivatorUtilities.cs (3)
418Expression.Constant(parameterType, typeof(Type)), 419Expression.Constant(constructor.DeclaringType, typeof(Type)), 421Expression.Constant(keyAttribute?.Key, typeof(object)) };
Microsoft.VisualBasic.Core (9)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (9)
329Expression.Constant(Name, GetType(String)), 334Expression.Constant(argNames, GetType(String())), 335Expression.Constant(_ignoreReturn, GetType(Boolean)) 413Expression.Constant(argNames, GetType(String())) 499Expression.Constant(argNames, GetType(String())), 568Expression.Constant(argNames, GetType(String())), 637Expression.Constant(argNames, GetType(String())), 1010Expression.Constant(indexNames, GetType(String())) 1083Expression.Constant(indexNames, GetType(String())),
System.ComponentModel.Composition (2)
System\ComponentModel\Composition\ConstraintServices.cs (2)
63Expression.Constant(contractName ?? string.Empty, typeof(string))); 155Expression.Constant(constantType, typeof(Type)),
System.Composition.Hosting (2)
System\Composition\Hosting\Providers\Metadata\MetadataViewProvider.cs (2)
57var dva = Expression.Constant(prop.GetCustomAttribute<DefaultValueAttribute>(false), typeof(DefaultValueAttribute)); 58var name = Expression.Constant(prop.Name, typeof(string));
System.Linq.Expressions (19)
System\Dynamic\BindingRestrictions.cs (1)
323Expression.Constant(_instance, typeof(object))
System\Dynamic\DynamicObject.cs (1)
508return Expression.Constant(binder, typeof(TBinder));
System\Dynamic\ExpandoObject.cs (6)
795Expression.Constant(klass, typeof(object)), 868Expression.Constant(klass, typeof(object)), 888Expression.Constant(Value.Class, typeof(object)), 937Expression.Constant(originalClass, typeof(object)), 938Expression.Constant(klass, typeof(object)) 950Expression.Constant(originalClass ?? klass, typeof(object))
System\Linq\Expressions\BinaryExpression.cs (2)
426Constant(null, Type) 431Constant(null, Type)
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (2)
694Expression.Equal(dictField, Expression.Constant(null, dictField.Type)), 736Expression.Equal(switchValue, Expression.Constant(null, typeof(string))),
System\Linq\Expressions\Interpreter\TypeOperations.cs (1)
602ConstantExpression boxesConst = Expression.Constant(new RuntimeOps.RuntimeVariables(boxes.ToArray()), typeof(IRuntimeVariables));
System\Linq\Expressions\TypeBinaryExpression.cs (2)
66return Expression.NotEqual(Expression, Expression.Constant(null, Expression.Type)); 133Expression.Constant(TypeOperand.GetNonNullableType(), typeof(Type))
System\Runtime\CompilerServices\CallSite.cs (2)
475Expression.Constant(null, applicable.Type) 594body.UncheckedAdd(Expression.Assign(rule, Expression.Constant(null, rule.Type)));
System\Runtime\CompilerServices\CallSiteBinder.cs (1)
168Expression.Constant(binding, typeof(Expression)),
System\Runtime\CompilerServices\RuntimeOps.ExpressionQuoter.cs (1)
157ConstantExpression boxesConst = Expression.Constant(new RuntimeVariables(boxes.ToArray()), typeof(IRuntimeVariables));
System.Linq.Queryable (40)
System\Linq\EnumerableRewriter.cs (1)
208return Expression.Constant(sq.Enumerable, t);
System\Linq\Queryable.cs (39)
178return q != null ? q.Expression : Expression.Constant(source, typeof(IEnumerable<TSource>)); 210outer.Expression, GetSourceExpression(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 242outer.Expression, GetSourceExpression(inner), Expression.Quote(outerKeySelector), Expression.Quote(innerKeySelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 315source.Expression, Expression.Constant(comparer, typeof(IComparer<T>)))); 341source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>)))); 414source.Expression, Expression.Constant(comparer, typeof(IComparer<T>)))); 440source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>)))); 466source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>)))); 492source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>)))); 626source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 640source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 683source.Expression, Expression.Quote(keySelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 698source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Quote(resultSelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 722source.Expression, Expression.Constant(comparer, typeof(IEqualityComparer<TSource>)))); 763source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 878Expression.Constant(comparer, typeof(IEqualityComparer<TSource>)))); 926Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 971Expression.Constant(comparer, typeof(IEqualityComparer<TSource>)))); 1021Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 1049Expression.Constant(comparer, typeof(IEqualityComparer<TSource>)))); 1101Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 1156source.Expression, Expression.Constant(defaultValue, typeof(TSource)))); 1189source.Expression, Expression.Quote(predicate), Expression.Constant(defaultValue, typeof(TSource)))); 1244source.Expression, Expression.Constant(defaultValue, typeof(TSource)))); 1277source.Expression, Expression.Quote(predicate), Expression.Constant(defaultValue, typeof(TSource)) 1334source.Expression, Expression.Constant(defaultValue, typeof(TSource)))); 1368source.Expression, Expression.Quote(predicate), Expression.Constant(defaultValue, typeof(TSource)))); 1459source.Expression, Expression.Constant(defaultValue, typeof(TSource)))); 1471source.Expression, Expression.Constant(item, typeof(TSource)))); 1483source.Expression, Expression.Constant(item, typeof(TSource)), Expression.Constant(comparer, typeof(IEqualityComparer<TSource>)))); 1523Expression.Constant(comparer, typeof(IEqualityComparer<TSource>)))); 1607source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IEqualityComparer<TKey>)))); 1664Expression.Constant(comparer, typeof(IComparer<TSource>)))); 1723Expression.Constant(comparer, typeof(IComparer<TSource>)))); 1754Expression.Constant(comparer, typeof(IComparer<TSource>)))); 1813Expression.Constant(comparer, typeof(IComparer<TSource>)))); 2383source.Expression, Expression.Quote(keySelector), Expression.Constant(seed), Expression.Quote(func), Expression.Constant(keyComparer, typeof(IEqualityComparer<TKey>)))); 2414source.Expression, Expression.Quote(keySelector), Expression.Quote(seedSelector), Expression.Quote(func), Expression.Constant(keyComparer, typeof(IEqualityComparer<TKey>))));