Export (0) Print
Expand All

StructuralObject.GetValidValue<T> Method (T, String, Boolean, Boolean)

Returns a complex type for the specified property.

Namespace:  System.Data.Objects.DataClasses
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

protected internal T GetValidValue<T>(
	T currentValue,
	string property,
	bool isNullable,
	bool isInitialized
)
where T : new(), ComplexObject

Type Parameters

T

The type of the complex object being requested. This type must inherit from ComplexObject.

Parameters

currentValue
Type: T
A complex object that inherits from ComplexObject.
property
Type: System.String
The name of the complex property that is the complex object.
isNullable
Type: System.Boolean
Indicates whether the type supports null values.
isInitialized
Type: System.Boolean
Indicated whether the type is initialized.

Return Value

Type: T
A complex type object for the property.

This method is used to return a new complex type when the complex type for a property is null.

If the type is not initialized and does not support null values, this method calls the SetValidValue method to assign a complex type to the property. If the value is initialized, the existing value is returned.

.NET Framework

Supported in: 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft