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