166 references to Constant
System.Activities (11)
System\Activities\Expressions\MethodCallExpressionHelper.cs (1)
36
Expression.Call(typeof(Convert).GetMethod("ChangeType", new Type[] { typeof(object), typeof(Type) }), Expression.ArrayIndex(objectArray, Expression.Constant(i)), Expression.
Constant
(variable.Type, typeof(Type))),
System\Activities\ExpressionUtilities.cs (9)
64
return Expression.Call(RuntimeContextParameter, activityContextGetValueGenericMethod.MakeGenericMethod(locationReference.Type), Expression.
Constant
(locationReference, typeof(LocationReference)));
1458
newExpression = Expression.Call(contextExpression, activityContextGetValueGenericMethod.MakeGenericMethod(returnType), Expression.
Constant
(inlinedReference, typeof(LocationReference)));
1486
newExpression = Expression.Call(Expression.
Constant
(inlinedReference, typeof(LocationReference)), locationReferenceGetLocationMethod, contextExpression);
1490
newExpression = Expression.Call(contextExpression, activityContextGetLocationGenericMethod.MakeGenericMethod(returnType), Expression.
Constant
(inlinedReference, typeof(LocationReference)));
1518
newExpression = Expression.Call(contextExpression, activityContextGetValueGenericMethod.MakeGenericMethod(returnType), Expression.
Constant
(inlinedReference, typeof(LocationReference)));
1546
newExpression = Expression.Call(Expression.
Constant
(inlinedReference, typeof(LocationReference)), locationReferenceGetLocationMethod, originalExpression.Arguments[0]);
1550
newExpression = Expression.Call(contextExpression, activityContextGetLocationGenericMethod.MakeGenericMethod(returnType), Expression.
Constant
(inlinedReference, typeof(LocationReference)));
1697
newExpression = Expression.Call(originalExpression.Object, activityContextGetValueGenericMethod.MakeGenericMethod(returnType), Expression.
Constant
(inlinedReference, typeof(LocationReference)));
1720
newExpression = Expression.Call(originalExpression.Object, activityContextGetLocationGenericMethod.MakeGenericMethod(returnType), Expression.
Constant
(inlinedReference, typeof(LocationReference)));
System\Activities\XamlIntegration\ExpressionTreeRewriter.cs (1)
49
newNode = Expression.
Constant
(inlinedReference.LocationReference, typeof(LocationReference));
System.Core (38)
Microsoft\Scripting\Actions\CallSite.cs (2)
490
Expression.
Constant
(null, applicable.Type)
637
body.Add(Expression.Assign(rule, Expression.
Constant
(null, rule.Type)));
Microsoft\Scripting\Actions\DynamicObject.cs (1)
429
return Expression.
Constant
(binder, t);
Microsoft\Scripting\Actions\ExpandoObject.cs (6)
702
Expression.
Constant
(klass, typeof(object)),
769
Expression.
Constant
(klass, typeof(object)),
788
Expression.
Constant
(Value.Class, typeof(object)),
833
Expression.
Constant
(originalClass, typeof(object)),
834
Expression.
Constant
(klass, typeof(object))
846
Expression.
Constant
(originalClass ?? klass, typeof(object))
Microsoft\Scripting\Ast\BinaryExpression.cs (2)
445
Constant
(null, Type)
449
Constant
(null, Type)
Microsoft\Scripting\Ast\TypeBinaryExpression.cs (3)
97
return Expression.NotEqual(Expression, Expression.
Constant
(null, Expression.Type));
99
return Expression.ReferenceNotEqual(Expression, Expression.
Constant
(null, Expression.Type));
146
Expression.
Constant
(_typeOperand.GetNonNullableType(), typeof(Type))
Microsoft\Scripting\Compiler\ExpressionQuoter.cs (1)
137
var boxesConst = Expression.
Constant
(new RuntimeVariables(boxes.ToArray()), typeof(IRuntimeVariables));
Microsoft\Scripting\Compiler\LambdaCompiler.Statements.cs (2)
604
Expression.Equal(dictField, Expression.
Constant
(null, dictField.Type)),
645
Expression.Equal(switchValue, Expression.
Constant
(null, typeof(string))),
System\Linq\IQueryable.cs (20)
223
return Expression.
Constant
(source, typeof(IEnumerable<TSource>));
272
Expression.
Constant
(comparer, typeof(IEqualityComparer<TKey>))
322
Expression.
Constant
(comparer, typeof(IEqualityComparer<TKey>)) }
349
new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.
Constant
(comparer, typeof(IComparer<TKey>)) }
375
new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.
Constant
(comparer, typeof(IComparer<TKey>)) }
401
new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.
Constant
(comparer, typeof(IComparer<TKey>)) }
427
new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.
Constant
(comparer, typeof(IComparer<TKey>)) }
542
new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.
Constant
(comparer, typeof(IEqualityComparer<TKey>)) }
557
new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.
Constant
(comparer, typeof(IEqualityComparer<TKey>)) }
607
new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Quote(resultSelector), Expression.
Constant
(comparer, typeof(IEqualityComparer<TKey>)) }
625
new Expression[] { source.Expression, Expression.Quote(keySelector), Expression.Quote(elementSelector), Expression.Quote(resultSelector), Expression.
Constant
(comparer, typeof(IEqualityComparer<TKey>)) }
647
new Expression[] { source.Expression, Expression.
Constant
(comparer, typeof(IEqualityComparer<TSource>)) }
704
Expression.
Constant
(comparer, typeof(IEqualityComparer<TSource>))
734
Expression.
Constant
(comparer, typeof(IEqualityComparer<TSource>))
764
Expression.
Constant
(comparer, typeof(IEqualityComparer<TSource>))
955
new Expression[] { source.Expression, Expression.
Constant
(defaultValue, typeof(TSource)) }
966
new Expression[] { source.Expression, Expression.
Constant
(item, typeof(TSource)) }
977
new Expression[] { source.Expression, Expression.
Constant
(item, typeof(TSource)), Expression.
Constant
(comparer, typeof(IEqualityComparer<TSource>)) }
1017
Expression.
Constant
(comparer, typeof(IEqualityComparer<TSource>))
System\Linq\SequenceQuery.cs (1)
301
return Expression.
Constant
(sq.Enumerable, t);
System.Data.Entity (35)
System\Data\Common\Internal\Materialization\Translator.cs (23)
612
private static readonly Expression DBNull_Value = Expression.
Constant
(DBNull.Value, typeof(object));
684
nullConstant = Expression.
Constant
(null, type);
689
nullConstant = Emit_EnsureType(Expression.
Constant
(null, typeof(object)), type);
770
result = Expression.New(ci, input, keyReader, entitySetReader, Shaper_Context, Expression.
Constant
(mergeOption, typeof(MergeOption)), Expression.
Constant
(identityType, typeof(Type)));
797
result = Expression.New(ci, input, keyReader, entitySetReader, Shaper_Context, Expression.
Constant
(mergeOption, typeof(MergeOption)), Expression.
Constant
(identityType, typeof(Type)),
919
entitySetReader = Expression.
Constant
(null, typeof(EntitySet));
920
return Expression.
Constant
(null, typeof(EntityKey));
923
entitySetReader = Expression.
Constant
(simpleEntityIdentity.EntitySet, typeof(EntitySet));
939
entitySetReader = Expression.
Constant
(null, typeof(EntitySet));
943
Expression.Equal(discriminator, Expression.
Constant
(i, typeof(int?))),
944
Expression.
Constant
(entitySets[i], typeof(EntitySet)),
983
noEntityKeyExpression = Expression.
Constant
(EntityKey.NoEntitySetKey, typeof(EntityKey));
987
noEntityKeyExpression = Expression.
Constant
(null, typeof(EntityKey));
990
Expression.Equal(setEntitySetStateSlotValue, Expression.
Constant
(null, typeof(EntitySet))),
1054
Expression.Constant(ordinal), Expression.Constant(propertyName), Expression.Constant(typeName), Expression.
Constant
(primitiveColumnType, typeof(PrimitiveTypeKind)));
1074
result = Expression.Call(Shaper_Parameter, Shaper_GetSpatialColumnValueWithErrorHandling.MakeGenericMethod(resultType), Expression.Constant(ordinal), Expression.
Constant
(primitiveColumnType, typeof(PrimitiveTypeKind)));
1453
Expression discriminatorConstant = Expression.
Constant
(typeChoice.Key, discriminatorReader.Type);
1714
Expression typeUsage = Expression.
Constant
(type, typeof(TypeUsage));
2019
Expression.
Constant
(discriminatorValue, discriminator.Type),
2049
Expression.
Constant
(null, typeof(EntityKey))
2132
Expression.
Constant
(TypeSystem.GetDefaultValue(columnType), columnType),
System\Data\Objects\ELinq\CompiledELinqQueryState.cs (1)
254
result = Expression.
Constant
(value, p.Type);
System\Data\Objects\ELinq\ELinqQueryState.cs (1)
245
Expression includeCall = Expression.Call(Expression.Constant(sourceQuery), includeMethod, new Expression[] { Expression.
Constant
(includePath, typeof(string)) });
System\Data\Objects\ELinq\Funcletizer.cs (3)
505
: Expression.
Constant
(value, expression.Type);
559
queryExpression = Expression.
Constant
(inlineQuery, expressionType);
717
constantExpression = Expression.
Constant
(memberVal, expression.Type);
System\Data\Objects\ELinq\InitializerFacet.cs (2)
303
Expression nullProjection = Expression.
Constant
(null, this.ClrType);
402
MemberBinding constantBinding = Expression.Bind(originalBinding.Member, Expression.
Constant
(
System\Data\Objects\ELinq\LinqExpressionNormalizer.cs (1)
109
return Expression.
Constant
(constant.Value, constant.Value.GetType());
System\Data\Objects\ELinq\MethodCallTranslator.cs (1)
2217
parent.TranslateExpression(Expression.
Constant
(defaultValue, elementType));
System\Data\Objects\ELinq\Translator.cs (1)
88
expressions.Add(Expression.
Constant
(o, elementType));
System\Data\SqlClient\SqlTypesAssembly.cs (2)
25
return Expression.
Constant
(null, typeof(TNullType));
30
return Expression.
Constant
(null, nullType);
System.Data.Linq (8)
ChangeDirector.cs (2)
369
Expression.
Constant
(memberValue, mm.Type)
404
Expression selector = Expression.Lambda(Expression.
Constant
(0, typeof(int?)), p);
DataContext.cs (1)
817
args.Add(Expression.
Constant
(parameters[i], pType));
DataServices.cs (1)
274
Expression keyValueExpression = Expression.
Constant
(keyValues[i], metaMember.Type);
SqlClient\Query\Funcletizer.cs (1)
55
return Expression.
Constant
(null, ue.Type);
SqlClient\Query\QueryConverter.cs (2)
673
Expression.ArrayIndex(cpArray.Accessor.Body, Expression.
Constant
(vIndex.Value, vIndex.ClrType)),
1965
return obs.Select(o => Expression.
Constant
(o, elemType)).ToArray();
SqlClient\Query\Translator.cs (1)
259
: (Expression)Expression.
Constant
(null, link.Member.Member.DeclaringType);
System.Data.Services (44)
System\Data\Services\Internal\ProjectedWrapper.cs (4)
341
Expression.
Constant
(string.Empty, typeof(string)));
344
Expression.
Constant
(string.Empty, typeof(string)));
369
Expression.
Constant
(string.Empty, typeof(string)));
384
Expression.
Constant
(string.Empty, typeof(string)))));
System\Data\Services\Parsing\FunctionDescription.cs (1)
400
return Expression.
Constant
(null, targetType);
System\Data\Services\Parsing\RequestQueryParser.cs (23)
276
Expression lastCondition = Expression.
Constant
(true, typeof(bool));
277
Expression lastMatch = Expression.
Constant
(false, typeof(bool));
360
expr = OpenTypeMethods.EqualExpression(expr, Expression.
Constant
(true, typeof(object)));
369
Expression test = Expression.Equal(expr, Expression.
Constant
(null, typeof(bool?)));
935
right = Expression.
Constant
(0, typeof(int));
956
right = Expression.
Constant
(0, typeof(int));
977
right = Expression.
Constant
(0, typeof(int));
998
right = Expression.
Constant
(0, typeof(int));
1479
return Expression.
Constant
(false, typeof(bool));
1483
return GenerateNotEqual(left, Expression.
Constant
(null, left.Type));
1488
GenerateNotEqual(left, Expression.
Constant
(null, left.Type)),
1490
GenerateEqual(right, Expression.
Constant
(null, right.Type)),
1498
return Expression.
Constant
(false, typeof(bool));
1502
return GenerateNotEqual(right, Expression.
Constant
(null, right.Type));
1507
GenerateNotEqual(right, Expression.
Constant
(null, left.Type)),
1509
GenerateEqual(left, Expression.
Constant
(null, right.Type)),
1537
left = Expression.
Constant
(null, right.Type);
1541
right = Expression.
Constant
(null, left.Type);
1955
finalArguments[arguments.Length] = Expression.
Constant
(IsOpenPropertyExpression(arguments[0]), typeof(bool));
2286
Expression test = Expression.Equal(element, Expression.
Constant
(null, element.Type));
2293
Expression trueIf = Expression.
Constant
(null, falseIf.Type);
2482
return Expression.
Constant
(null, type);
2536
return Expression.
Constant
(value, type);
System\Data\Services\Providers\BasicExpandProvider.cs (15)
1289
Expression.Equal(source, Expression.
Constant
(null, source.Type)),
1290
Expression.
Constant
(null, expression.Type),
1369
ConstantExpression count = Expression.
Constant
((int)this.Node.MaxResultsExpected + 1, typeof(int));
1489
Expression.Equal(source, Expression.
Constant
(null, source.Type)),
1490
Expression.
Constant
(null, propertyAccess.Type),
1508
skipTokenPropertyBindings[0] = BindByName(projectedSkipTokenType, "ExpandedElement", Expression.
Constant
((string)null, typeof(string)));
1620
propertyAccess = Expression.
Constant
(null, WebUtil.GetTypeAllowingNull(projectedProperty.Property.Type));
1625
propertyAccess = Expression.
Constant
(null, typeof(object));
1672
Expression.
Constant
(null, source.Type)),
1673
Expression.
Constant
(string.Empty, typeof(string)),
1674
Expression.
Constant
(resourceType.FullName, typeof(string)));
1678
bindingExpressions[0] = Expression.
Constant
(resourceType.FullName, typeof(string));
1717
Expression.Equal(source, Expression.
Constant
(null, source.Type)),
1718
Expression.
Constant
(null, expression.Type),
1770
Expression.
Constant
(this.Node.MaxResultsExpected, typeof(int)));
System\Data\Services\RequestQueryProcessor.cs (1)
240
Expression conditionFalse = Expression.
Constant
(null, conditionTrue.Type);
System.Data.Services.Client (25)
System\Data\Services\Client\ALinq\Evaluator.cs (1)
181
return Expression.
Constant
(constantValue, constantType);
System\Data\Services\Client\ALinq\ExpressionNormalizer.cs (1)
203
return Expression.
Constant
(constant.Value, constant.Value.GetType());
System\Data\Services\Client\ALinq\SkipQueryOptionExpression.cs (1)
66
return new SkipQueryOptionExpression(this.Type, Expression.
Constant
(thisValue + previousValue, typeof(int)));
System\Data\Services\Client\DataServiceQueryOfT.cs (1)
195
new Expression[] { Expression.Constant(name), Expression.
Constant
(value, typeof(object)) }));
System\Data\Services\Client\ProjectionPlanCompiler.cs (21)
435
Expression result = CallMaterializer("ProjectionCheckValueForPathIsNull", entry, entryType, Expression.
Constant
(path, typeof(object)));
450
Expression result = CallMaterializer("ProjectionValueForPath", this.materializerExpression, entry, entryType, Expression.
Constant
(path, typeof(object)));
505
Expression iftrue = Expression.
Constant
(null, assignForProjection.Type);
542
Expression projectedTypeExpression = Expression.
Constant
(projectedType, typeof(Type));
603
Expression.
Constant
(assignment.Member.Name, typeof(string)));
727
Expression.
Constant
(((MemberExpression)path[pathIndex]).Member.Name, typeof(string)));
800
Expression baseTypeExpression = Expression.
Constant
(baseSourceExpression.Type, typeof(Type));
860
Expression.
Constant
(null, typeof(DataServiceContext)),
862
Expression.
Constant
(TrackingMode.AutoChangeTracking, typeof(TrackingMode)),
863
Expression.
Constant
(null, typeof(string)),
864
Expression.
Constant
(null, typeof(Func<EntityChangedParams, bool>)),
865
Expression.
Constant
(null, typeof(Func<EntityCollectionChangedParams, bool>)));
878
Expression.
Constant
(null, typeof(DataServiceContext)),
881
Expression.
Constant
(null, typeof(string)),
882
Expression.
Constant
(null, typeof(Func<EntityChangedParams, bool>)),
883
Expression.
Constant
(null, typeof(Func<EntityCollectionChangedParams, bool>)));
900
Expression.
Constant
(null, typeof(DataServiceContext)),
982
Expression.
Constant
(returnElementType, typeof(Type)),
983
Expression.
Constant
(annotation.Segment.StartPath, typeof(object)),
1071
Expression.
Constant
(returnElementType, typeof(Type)),
1072
Expression.
Constant
(annotation.Segment.StartPath, typeof(object)),
System.Web.Extensions (5)
UI\WebControls\Dynamic.cs (2)
1498
return Expression.
Constant
(null, type);
1520
return Expression.
Constant
(value, type);
UI\WebControls\Expressions\PropertyExpression.cs (1)
27
Expression valueExpression = Expression.
Constant
(value, property.Type);
UI\WebControls\Expressions\SearchExpression.cs (2)
84
return Expression.Call(property, SearchType.ToString(), Type.EmptyTypes, Expression.
Constant
(query, property.Type));
86
return Expression.Call(property, SearchType.ToString(), Type.EmptyTypes, Expression.
Constant
(query, property.Type), Expression.Constant(ComparisonType));