src/Shared/EntityFramework/Core/Objects/DataClasses/StructuralObject.cs
/// <summary>Returns a complex type for the specified property.</summary>
/// <remarks>
/// Unlike most of the other helper methods in this class, this one is not static
/// because it references the SetValidValue for complex objects, which is also not static
/// because it needs a reference to this.
/// </remarks>        
/// <returns>A complex type object for the property.</returns>
/// <param name="currentValue">A complex object that inherits from complex object.</param>
/// <param name="property">The name of the complex property that is the complex object.</param>
/// <param name="isNullable">Indicates whether the type supports null values.</param>
/// <param name="isInitialized">Indicates whether the type is initialized.</param>
/// <typeparam name="T">The type of the complex object being requested.</typeparam>
Returns a complex type for the specified property.
Returns a complex type for the specified property .
protected internal T GetValidValue<T>(T currentValue, string property, bool isNullable, bool isInitialized)
            where T : ComplexObject, new()
        {
            if (!isNullable
                && !isInitialized)
            {
                currentValue = SetValidValue(currentValue, new T(), property);
            }
            return currentValue;
        }
protected internal T GetValidValue < T > ( T currentValue , string property , bool isNullable , bool isInitialized ) where T : ComplexObject , new ( ) { if ( ! isNullable && ! isInitialized ) { currentValue = SetValidValue ( currentValue , new T ( ) , property ) ; } return currentValue ; }
Returns a complex type for the specified property.
Returns a complex type for the specified property .
// If we support complex type inheritance we will also need to check if T is abstract            
A complex type object for the property.
A complex type object for the property .
currentValue
T
A complex object that inherits from complex object.
A complex object that inherits from complex object .
property
string
The name of the complex property that is the complex object.
The name of the complex property that is the complex object .
isNullable
bool
Indicates whether the type supports null values.
Indicates whether the type supports null values .
isInitialized
bool
Indicates whether the type is initialized.
Indicates whether the type is initialized .
remarks
Unlike most of the other helper methods in this class, this one is not static
because it references the SetValidValue for complex objects, which is also not static
because it needs a reference to this.
Unlike most of the other helper methods in this class this one is not static because it references the SetValidValue for complex objects which is also not static because it needs a reference to this .
typeparam
The type of the complex object being requested.
The type of the complex object being requested .