1 type derived from ConstantExpression
System.Core (1)
Microsoft\Scripting\Ast\ConstantExpression.cs (1)
89
internal class TypedConstantExpression :
ConstantExpression
{
1 instantiation of ConstantExpression
System.Core (1)
Microsoft\Scripting\Ast\ConstantExpression.cs (1)
47
return new
ConstantExpression
(value);
198 references to ConstantExpression
System.Activities (17)
Microsoft\VisualBasic\Activities\VisualBasicDesignerHelper.cs (2)
434
ConstantExpression
constantExpr = (
ConstantExpression
)expression;
System\Activities\Expressions\ExpressionServices.cs (10)
130
ConstantExpression
constantExpressionBody = body as
ConstantExpression
;
367
if (member.Expression is
ConstantExpression
)
369
ConstantExpression
memberExpression = member.Expression as
ConstantExpression
;
514
if (member.Expression is
ConstantExpression
)
516
ConstantExpression
memberExpression = member.Expression as
ConstantExpression
;
1502
object value = ((
ConstantExpression
)expression).Value;
1560
object value = ((
ConstantExpression
)expression).Value;
System\Activities\ExpressionUtilities.cs (2)
1569
ConstantExpression
constantExpression = expression as
ConstantExpression
;
System\Activities\XamlIntegration\ExpressionTreeRewriter.cs (3)
30
ConstantExpression
constExpr = (
ConstantExpression
)node.Expression;
41
protected override Expression VisitConstant(
ConstantExpression
node)
System.Core (34)
Microsoft\Scripting\Actions\DynamicObject.cs (1)
424
private static
ConstantExpression
Constant(DynamicMetaObjectBinder binder) {
Microsoft\Scripting\Ast\BinaryExpression.cs (2)
764
var
c = e as
ConstantExpression
;
Microsoft\Scripting\Ast\ConstantExpression.cs (9)
45
internal static
ConstantExpression
Make(object value, Type type) {
104
/// Creates a <see cref="
ConstantExpression
"/> that has the <see cref="P:ConstantExpression.Value"/> property set to the specified value. .
108
/// A <see cref="
ConstantExpression
"/> that has the <see cref="P:Expression.NodeType"/> property equal to
111
public static
ConstantExpression
Constant(object value) {
112
return
ConstantExpression
.Make(value, value == null ? typeof(object) : value.GetType());
117
/// Creates a <see cref="
ConstantExpression
"/> that has the <see cref="P:ConstantExpression.Value"/>
123
/// A <see cref="
ConstantExpression
"/> that has the <see cref="P:Expression.NodeType"/> property equal to
127
public static
ConstantExpression
Constant(object value, Type type) {
135
return
ConstantExpression
.Make(value, type);
Microsoft\Scripting\Ast\DebugViewWriter.cs (1)
484
protected internal override Expression VisitConstant(
ConstantExpression
node) {
Microsoft\Scripting\Ast\Expression.DebuggerProxy.cs (2)
98
private readonly
ConstantExpression
_node;
100
public ConstantExpressionProxy(
ConstantExpression
node) {
Microsoft\Scripting\Ast\ExpressionStringBuilder.cs (1)
384
protected internal override Expression VisitConstant(
ConstantExpression
node) {
Microsoft\Scripting\Ast\ExpressionVisitor.cs (2)
254
/// Visits the <see cref="
ConstantExpression
" />.
259
protected internal virtual Expression VisitConstant(
ConstantExpression
node) {
Microsoft\Scripting\Ast\TypeBinaryExpression.cs (2)
152
ConstantExpression
ce = Expression as
ConstantExpression
;
Microsoft\Scripting\Compiler\ConstantCheck.cs (1)
37
return ((
ConstantExpression
)e).Value == null;
Microsoft\Scripting\Compiler\ExpressionQuoter.cs (1)
137
var
boxesConst = Expression.Constant(new RuntimeVariables(boxes.ToArray()), typeof(IRuntimeVariables));
Microsoft\Scripting\Compiler\LambdaCompiler.Expressions.cs (2)
465
ConstantExpression
node = (
ConstantExpression
)expr;
Microsoft\Scripting\Compiler\LambdaCompiler.Statements.cs (4)
335
if (!node.Cases.All(c => c.TestValues.All(t => t is
ConstantExpression
))) {
353
foreach (
ConstantExpression
test in node.Cases[i].TestValues) {
566
if (!(t is
ConstantExpression
)) {
587
foreach (
ConstantExpression
t in node.Cases[i].TestValues) {
Microsoft\Scripting\Compiler\VariableBinder.cs (1)
63
protected internal override Expression VisitConstant(
ConstantExpression
node) {
System\Linq\Expressions\ExpressionVisitor.cs (2)
62
return this.VisitConstant((
ConstantExpression
)exp);
137
internal virtual Expression VisitConstant(
ConstantExpression
c) {
System\Linq\SequenceQuery.cs (3)
136
ConstantExpression
c = this.expression as
ConstantExpression
;
295
internal override Expression VisitConstant(
ConstantExpression
c) {
System.Data.Entity (26)
System\Data\Objects\ELinq\CompiledELinqQueryState.cs (1)
200
/// producing an expression that contains the values of those parameters as <see cref="
ConstantExpression
"/>s.
System\Data\Objects\ELinq\EntityExpressionVisitor.cs (2)
71
return this.VisitConstant((
ConstantExpression
)exp);
158
internal virtual Expression VisitConstant(
ConstantExpression
c)
System\Data\Objects\ELinq\Funcletizer.cs (10)
38
private readonly
ConstantExpression
_rootContextExpression;
97
internal
ConstantExpression
RootContextExpression
459
value = ((
ConstantExpression
)expression).Value;
476
value = ((
ConstantExpression
)ue.Operand).Value;
629
return ((
ConstantExpression
)_funcletizedExpression).Value;
631
ConstantExpression
ce;
686
private bool TryEvaluatePath(Expression expression, out
ConstantExpression
constantExpression)
699
ConstantExpression
ce = me.Expression as
ConstantExpression
;
703
if (!TryGetFieldOrPropertyValue(me, ((
ConstantExpression
)me.Expression).Value, out memberVal))
System\Data\Objects\ELinq\LinqExpressionNormalizer.cs (4)
103
ConstantExpression
constant = (
ConstantExpression
)input;
127
((
ConstantExpression
)expression).Value.Equals(0);
412
if (coalesce.Right.NodeType == ExpressionType.Constant && false.Equals(((
ConstantExpression
)coalesce.Right).Value))
System\Data\Objects\ELinq\MethodCallTranslator.cs (5)
483
MergeOption mergeAsOption = (MergeOption)((
ConstantExpression
)call.Arguments[0]).Value;
508
Span span = (Span)((
ConstantExpression
)call.Arguments[0]).Value;
1352
return object.Equals(((
ConstantExpression
)newArray.Expressions[0]).Value, 0);
1501
ConstantExpression
intervalLinqExpression = call.Arguments[0] as
ConstantExpression
;
System\Data\Objects\ELinq\Translator.cs (4)
58
: TypedTranslator<System.Linq.Expressions.
ConstantExpression
>
62
protected override DbExpression TypedTranslate(ExpressionConverter parent,
ConstantExpression
linq)
1047
System.Linq.Expressions.
ConstantExpression
constant = (System.Linq.Expressions.
ConstantExpression
)expression;
System.Data.Linq (19)
DataServices.cs (6)
502
ConstantExpression
cex = mc.Arguments[0] as
ConstantExpression
;
572
ConstantExpression
cex = vex as
ConstantExpression
;
579
ConstantExpression
ce = ie.Expression as
ConstantExpression
;
SqlClient\Query\Funcletizer.cs (4)
53
ConstantExpression
c = (
ConstantExpression
)ue.Operand;
189
return this.VisitConstant((
ConstantExpression
)exp);
264
internal virtual Expression VisitConstant(
ConstantExpression
c) {
SqlClient\Query\QueryConverter.cs (9)
201
return this.VisitConstant((
ConstantExpression
)node);
294
((
ConstantExpression
)fex).Value != query) {
796
private SqlNode VisitConstant(
ConstantExpression
cons) {
1960
ConstantExpression
c = array as
ConstantExpression
;
2402
ConstantExpression
conItem = item as
ConstantExpression
;
2585
ConstantExpression
conItem = item as
ConstantExpression
;
System.Data.Services (35)
parent\Client\System\Data\Services\Client\ALinq\ALinqExpressionVisitor.cs (2)
150
return this.VisitConstant((
ConstantExpression
)exp);
273
internal virtual Expression VisitConstant(
ConstantExpression
c)
System\Data\Services\Internal\PropertyAccessVisitor.cs (5)
27
/// <see cref="
ConstantExpression
"/> node. This may mean that if there were some rewrites applied
46
ConstantExpression
propertyExpression = m.Arguments[1] as
ConstantExpression
;
56
ConstantExpression
propertyExpression = m.Arguments[1] as
ConstantExpression
;
System\Data\Services\Parsing\FunctionDescription.cs (16)
326
ConstantExpression
ce = (
ConstantExpression
)arguments[0];
336
ConstantExpression
ce = (
ConstantExpression
)arguments[1];
349
Debug.Assert(((
ConstantExpression
)arguments[0]).Type == typeof(ResourceType), "Constant expression type should be ResourceType");
362
Debug.Assert(((
ConstantExpression
)arguments[1]).Type == typeof(ResourceType), "Constant expression type should be ResourceType");
364
Debug.Assert(((
ConstantExpression
)arguments[2]).Type == typeof(bool), "Constant expression type should be boolean");
366
bool callOpenTypeMethod = ((bool)((
ConstantExpression
)arguments[2]).Value) == true;
377
ConstantExpression
ce = (
ConstantExpression
)arguments[0];
388
ConstantExpression
ce = (
ConstantExpression
)arguments[1];
415
Debug.Assert(((
ConstantExpression
)arguments[0]).Type == typeof(ResourceType), "Constant expression type should be ResourceType");
428
Debug.Assert(((
ConstantExpression
)arguments[1]).Type == typeof(ResourceType), "Constant expression type should be ResourceType");
430
Debug.Assert(((
ConstantExpression
)arguments[2]).Type == typeof(bool), "Constant expression type should be boolean");
432
bool callOpenTypeMethod = ((bool)((
ConstantExpression
)arguments[2]).Value) == true;
System\Data\Services\Parsing\RequestQueryParser.cs (9)
140
private static readonly
ConstantExpression
trueLiteral = Expression.Constant(true);
143
private static readonly
ConstantExpression
falseLiteral = Expression.Constant(false);
350
return ((
ConstantExpression
)e).Value;
1937
Type castTargetType = (Type)((
ConstantExpression
)typeExpression).Value;
1984
WebUtil.TryResolveResourceType(this.provider, (string)((
ConstantExpression
)candidateTypeArgument).Value),
2173
ConstantExpression
expr = Expression.Constant(value);
2279
if (element is
ConstantExpression
&& element != WebUtil.NullLiteral)
2475
ConstantExpression
ce = expr as
ConstantExpression
;
System\Data\Services\Providers\BasicExpandProvider.cs (1)
1369
ConstantExpression
count = Expression.Constant((int)this.Node.MaxResultsExpected + 1, typeof(int));
System\Data\Services\WebUtil.cs (2)
52
internal static readonly
ConstantExpression
NullLiteral = Expression.Constant(null);
888
(expression.NodeType == ExpressionType.Constant && ((
ConstantExpression
)expression).Value == null);
System.Data.Services.Client (61)
System\Data\Services\Client\ALinq\ALinqExpressionVisitor.cs (2)
150
return this.VisitConstant((
ConstantExpression
)exp);
273
internal virtual Expression VisitConstant(
ConstantExpression
c)
System\Data\Services\Client\ALinq\ExpressionNormalizer.cs (4)
197
ConstantExpression
constant = (
ConstantExpression
)input;
222
((
ConstantExpression
)expression).Value.Equals(0);
492
if (coalesce.Right.NodeType == ExpressionType.Constant && false.Equals(((
ConstantExpression
)coalesce.Right).Value))
System\Data\Services\Client\ALinq\ExpressionWriter.cs (1)
288
internal override Expression VisitConstant(
ConstantExpression
c)
System\Data\Services\Client\ALinq\NavigationPropertySingletonExpression.cs (2)
47
internal NavigationPropertySingletonExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List<string> expandPaths, CountOption countOption, Dictionary<
ConstantExpression
,
ConstantExpression
> customQueryOptions, ProjectionQueryOptionExpression projection)
System\Data\Services\Client\ALinq\ProjectionAnalyzer.cs (2)
391
internal override Expression VisitConstant(
ConstantExpression
c)
722
internal override Expression VisitConstant(
ConstantExpression
c)
System\Data\Services\Client\ALinq\ResourceBinder.cs (24)
204
Dictionary<PropertyInfo,
ConstantExpression
> keyValues;
220
Dictionary<PropertyInfo,
ConstantExpression
> inputKeyValues;
275
private static void SetKeyPredicate(ResourceSetExpression rse, Dictionary<PropertyInfo,
ConstantExpression
> keyValues)
282
rse.KeyPredicate = new Dictionary<PropertyInfo,
ConstantExpression
>(EqualityComparer<PropertyInfo>.Default);
354
out Dictionary<PropertyInfo,
ConstantExpression
> keyValues)
365
ConstantExpression
constantValue;
370
keyValues = new Dictionary<PropertyInfo,
ConstantExpression
>(EqualityComparer<PropertyInfo>.Default);
420
private static Expression BuildKeyPredicateFilter(InputReferenceExpression input, Dictionary<PropertyInfo,
ConstantExpression
> keyValuesDictionary)
427
foreach (KeyValuePair<PropertyInfo,
ConstantExpression
> keyValue in keyValuesDictionary)
859
ConstantExpression
ce = StripTo<
ConstantExpression
>(mce.Arguments[0]);
880
ConstantExpression
name = StripTo<
ConstantExpression
>(mce.Arguments[0]);
881
ConstantExpression
value = StripTo<
ConstantExpression
>(mce.Arguments[1]);
1094
private static Expression AnalyzeResourceSetConstantMethod(MethodCallExpression mce, Func<MethodCallExpression, ResourceExpression,
ConstantExpression
, Expression> constantMethodAnalyzer)
1097
ConstantExpression
constantArg = StripTo<
ConstantExpression
>(mce.Arguments[1]);
1443
internal static bool MatchConstant(Expression e, out
ConstantExpression
constExpr)
1445
constExpr = e as
ConstantExpression
;
1538
internal static bool MatchKeyComparison(Expression e, out PropertyInfo keyProperty, out
ConstantExpression
keyValue)
2024
ConstantExpression
constant = expression as
ConstantExpression
;
2314
string name = ((string)(e as
ConstantExpression
).Value).Trim();
System\Data\Services\Client\ALinq\ResourceExpression.cs (9)
57
private Dictionary<
ConstantExpression
,
ConstantExpression
> customQueryOptions;
72
internal ResourceExpression(Expression source, ExpressionType nodeType, Type type, List<string> expandPaths, CountOption countOption, Dictionary<
ConstantExpression
,
ConstantExpression
> customQueryOptions, ProjectionQueryOptionExpression projection)
77
this.customQueryOptions = customQueryOptions ?? new Dictionary<
ConstantExpression
,
ConstantExpression
>(ReferenceEqualityComparer<
ConstantExpression
>.Instance);
119
internal virtual Dictionary<
ConstantExpression
,
ConstantExpression
> CustomQueryOptions
System\Data\Services\Client\ALinq\ResourceSetExpression.cs (5)
41
private Dictionary<PropertyInfo,
ConstantExpression
> keyFilter;
61
internal ResourceSetExpression(Type type, Expression source, Expression memberExpression, Type resourceType, List<string> expandPaths, CountOption countOption, Dictionary<
ConstantExpression
,
ConstantExpression
> customQueryOptions, ProjectionQueryOptionExpression projection)
68
(source == null && memberExpression is
ConstantExpression
) ||
126
internal Dictionary<PropertyInfo,
ConstantExpression
> KeyPredicate
System\Data\Services\Client\ALinq\SkipQueryOptionExpression.cs (3)
25
private
ConstantExpression
skipAmount;
32
internal SkipQueryOptionExpression(Type type,
ConstantExpression
skipAmount)
41
internal
ConstantExpression
SkipAmount
System\Data\Services\Client\ALinq\TakeQueryOptionExpression.cs (3)
25
private
ConstantExpression
takeAmount;
32
internal TakeQueryOptionExpression(Type type,
ConstantExpression
takeAmount)
41
internal
ConstantExpression
TakeAmount
System\Data\Services\Client\ALinq\UriWriter.cs (6)
107
internal override Expression VisitConstant(
ConstantExpression
c)
239
this.uriBuilder.Append(UriHelper.FORWARDSLASH).Append((string)((
ConstantExpression
)rse.MemberExpression).Value);
515
internal void VisitCustomQueryOptions(Dictionary<
ConstantExpression
,
ConstantExpression
> options)
517
List<
ConstantExpression
> keys = options.Keys.ToList();
518
List<
ConstantExpression
> values = options.Values.ToList();
System.Web.Extensions (6)
UI\WebControls\Dynamic.cs (4)
999
ConstantExpression
expr = Expression.Constant(value);
1494
if (expr is
ConstantExpression
) {
1495
ConstantExpression
ce = (
ConstantExpression
)expr;
UI\WebControls\Expressions\RangeExpression.cs (2)
99
ConstantExpression
constantValue = Expression.Constant(ExpressionHelper.BuildObjectValue(value, propertyExpression.Type));
114
ConstantExpression
constantValue = Expression.Constant(ExpressionHelper.BuildObjectValue(value, propertyExpression.Type));