src/Shared/EntityFramework/Core/Metadata/Edm/FacetDescription.cs
// <summary>
// Gets a cached facet instance with the specified boolean value.
// </summary>
// <param name="value"> Value for the Facet result. </param>
// <returns> A cached facet instance with the specified boolean value. </returns>
Gets a cached facet instance with the specified boolean value.
Gets a cached facet instance with the specified boolean value .
internal Facet GetBooleanFacet(bool value)
        {
            Debug.Assert(FacetType.Identity == "Edm.Boolean");
            if (_valueCache == null)
            {
                var valueCache = new Facet[2];
                valueCache[0] = Facet.Create(this, true, true);
                valueCache[1] = Facet.Create(this, false, true);
                Interlocked.CompareExchange(
                    ref _valueCache,
                    valueCache,
                    null
                    );
            }
            return (value) ? _valueCache[0] : _valueCache[1];
        }
internal Facet GetBooleanFacet ( bool value ) { Debug . Assert ( FacetType . Identity == " " ) ; if ( _valueCache == null ) { var valueCache = new Facet [ 2 ] ; valueCache [ 0 ] = Facet . Create ( this , true , true ) ; valueCache [ 1 ] = Facet . Create ( this , false , true ) ; Interlocked . CompareExchange ( ref _valueCache , valueCache , null ) ; } return ( value ) ? _valueCache [ 0 ] : _valueCache [ 1 ] ; }
Gets a cached facet instance with the specified boolean value.
Gets a cached facet instance with the specified boolean value .
A cached facet instance with the specified boolean value.
A cached facet instance with the specified boolean value .
value
bool
Value for the Facet result.
Value for the Facet result .