Edit

Share via


Link<T> Struct

Definition

Used to enable deferred loading of individual properties (similar to EntityRef<TEntity>).

C#
public struct Link<T>

Type Parameters

T

The type of the elements in the deferred source.

Inheritance
Link<T>

Remarks

If you assign a deferred source (IEnumerable<T>) to Link<T>, Link<T> loads the value by enumerating the source the first time the Value property is accessed.

Constructors

Link<T>(IEnumerable<T>)

Initializes a new instance of the Link<T> structure by referencing the source.

Link<T>(Link<T>)

Initializes a new instance of the Link<T> structure by copying the internal state from another Link<T> instance.

Link<T>(T)

Initializes a new instance of the Link<T> structure by referencing the value of the property.

Properties

HasLoadedOrAssignedValue

Specifies whether the Link<T> has loaded or assigned a value.

HasValue

Gets a value that specifies whether the source has a value.

Value

Gets or sets the value assigned to or loaded by the Link<T>.

Applies to

Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also