1 write to Value
System.Linq.Expressions (1)
System\Linq\Expressions\ConstantExpression.cs (1)
17
Value
= value;
55 references to Value
Microsoft.AspNetCore.Components.Forms (6)
FieldIdentifier.cs (4)
116
case ConstantExpression constant when constant.
Value
== null:
118
case ConstantExpression constant when constant.
Value
!= null:
119
model = constant.
Value
;
163
value = model.
Value
?? throw new ArgumentException("The provided expression must evaluate to a non-null value.");
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
243
format(constantExpression.
Value
!, ref builder);
287
switch (constantExpression.
Value
)
Microsoft.AspNetCore.Components.Web (2)
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
243
format(constantExpression.
Value
!, ref builder);
287
switch (constantExpression.
Value
)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
ParameterBindingMethodCacheTests.cs (1)
113
Assert.True(((call.Arguments[1] as ConstantExpression)!.
Value
as CultureInfo)!.Equals(CultureInfo.InvariantCulture));
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
CachedExpressionCompiler.cs (2)
102
var constantValue = constantExpression.
Value
;
187
var capturedLocal = constantExpression.
Value
;
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
ExpressionTrees\Sources\ExprLambdaUtils.vb (2)
202
_s.AppendLine(_indent + If(node.
Value
Is Nothing, "null", GetCultureInvariantString(node.
Value
)))
Microsoft.ML.Core (12)
Utilities\FuncInstanceMethodInfo1`2.cs (2)
74
Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).
Value
== typeof(Func<TResult>), nameof(expression), "Unexpected expression form");
82
var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).
Value
;
Utilities\FuncInstanceMethodInfo1`3.cs (2)
75
Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).
Value
== typeof(Func<T, TResult>), nameof(expression), "Unexpected expression form");
83
var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).
Value
;
Utilities\FuncInstanceMethodInfo1`4.cs (2)
76
Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).
Value
== typeof(Func<T1, T2, TResult>), nameof(expression), "Unexpected expression form");
84
var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).
Value
;
Utilities\FuncInstanceMethodInfo2`4.cs (2)
76
Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).
Value
== typeof(Func<T1, T2, TResult>), nameof(expression), "Unexpected expression form");
84
var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).
Value
;
Utilities\FuncInstanceMethodInfo3`3.cs (2)
75
Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).
Value
== typeof(Func<T, TResult>), nameof(expression), "Unexpected expression form");
83
var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).
Value
;
Utilities\FuncInstanceMethodInfo3`4.cs (2)
76
Contracts.CheckParam((Type)((ConstantExpression)methodCallExpression.Arguments[0]).
Value
== typeof(Func<T1, T2, TResult>), nameof(expression), "Unexpected expression form");
84
var methodInfo = (MethodInfo)((ConstantExpression)methodCallExpression.Object).
Value
;
System.Linq.Expressions (28)
System\Linq\Expressions\BinaryExpression.cs (1)
796
return c != null && c.
Value
== null;
System\Linq\Expressions\Common\ConstantCheck.cs (1)
22
ExpressionType.Constant => ((ConstantExpression)e).
Value
== null,
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (1)
562
EmitConstant(node.
Value
, node.Type);
System\Linq\Expressions\Compiler\LambdaCompiler.Statements.cs (3)
407
decimal key = ConvertSwitchValue(test.
Value
);
413
keys.Add(new SwitchLabel(key, test.
Value
!, labels[i]));
675
if (t.
Value
!= null)
System\Linq\Expressions\Compiler\VariableBinder.cs (2)
60
if (ILGen.CanEmitConstant(node.
Value
, node.Type))
65
_constants.Peek().AddReference(node.
Value
!, node.Type);
System\Linq\Expressions\ConstantExpression.cs (8)
28
if (
Value
== null)
33
return
Value
.GetType();
72
/// Creates a <see cref="ConstantExpression"/> that has the <see cref="ConstantExpression.
Value
"/> property set to the specified value. .
74
/// <param name="value">An <see cref="object"/> to set the <see cref="ConstantExpression.
Value
"/> property equal to.</param>
77
/// <see cref="ExpressionType.Constant"/> and the <see cref="ConstantExpression.
Value
"/> property set to the specified value.
85
/// Creates a <see cref="ConstantExpression"/> that has the <see cref="ConstantExpression.
Value
"/>
88
/// <param name="value">An <see cref="object"/> to set the <see cref="ConstantExpression.
Value
"/> property equal to.</param>
92
/// <see cref="ExpressionType.Constant"/> and the <see cref="ConstantExpression.
Value
"/> and
System\Linq\Expressions\DebugViewWriter.cs (1)
453
object? value = node.
Value
;
System\Linq\Expressions\Expression.DebuggerProxy.cs (1)
102
public object? Value => _node.
Value
;
System\Linq\Expressions\ExpressionStringBuilder.cs (4)
352
if (node.
Value
!= null)
354
string? sValue = node.
Value
.ToString();
355
if (node.
Value
is string)
361
else if (sValue == node.
Value
.GetType().ToString())
System\Linq\Expressions\Interpreter\LightCompiler.cs (4)
347
_instructions.EmitLoad(node.
Value
, node.Type);
973
return c != null && c.
Value
== null;
1655
var key = (T)testValue.
Value
!;
1699
var key = (string?)testValue.
Value
;
System\Linq\Expressions\TypeBinaryExpression.cs (2)
142
if (ce!.
Value
== null)
148
return Utils.Constant(TypeOperand.GetNonNullableType() == ce.
Value
.GetType());
System.Linq.Queryable (2)
System\Linq\EnumerableQuery.cs (1)
121
if (_expression is ConstantExpression c && c.
Value
== this)
System\Linq\EnumerableRewriter.cs (1)
203
if (c.
Value
is EnumerableQuery sq)