src/Shared/EntityFramework/Core/Mapping/Update/Internal/Propagator.Evaluator.cs
// <summary>
// Given an expression, converts to a (nullable) bool. Only boolean constant and null are
// supported.
// </summary>
// <param name="result"> Result to convert </param>
// <returns> true if true constant; false if false constant; null is null constant </returns>
Given an expression, converts to a (nullable) bool. Only boolean constant and null are
supported.
Given an expression converts to a ( nullable ) bool . Only boolean constant and null are supported .
private static bool? ConvertResultToBool(PropagatorResult result)
            {
                DebugCheck.NotNull(result);
                Debug.Assert(result.IsSimple, "Must be a simple Boolean result");
                if (result.IsNull)
                {
                    return null;
                }
                else
                {
                    return (bool)result.GetSimpleValue();
                }
            }
private static bool ? ConvertResultToBool ( PropagatorResult result ) { DebugCheck . NotNull ( result ) ; Debug . Assert ( result . IsSimple , " " ) ; if ( result . IsNull ) { return null ; } else { return ( bool ) result . GetSimpleValue ( ) ; } }
Given an expression, converts to a (nullable) bool.
Given an expression converts to a ( nullable ) bool .
// rely on cast exception to identify invalid cases (CQT validation should already take care of this)
true if true constant; false if false constant; null is null constant
true if true constant ; false if false constant ; null is null constant
result
PropagatorResult
Result to convert
Result to convert