Link<T> 结构

定义

用于启用单个属性(类似于 EntityRef<TEntity>)的延迟加载。Used to enable deferred loading of individual properties (similar to EntityRef<TEntity>).

generic <typename T>
public value class Link
public struct Link<T>
type Link<'T> = struct
Public Structure Link(Of T)

类型参数

T

延迟源中的元素的类型。The type of the elements in the deferred source.

继承
Link<T>

注解

如果将延迟的源IEnumerable<T>() 分配给, 则在第一次访问该Value属性时, Link<T>会通过枚举源来Link<T>加载该值。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.

构造函数

Link<T>(IEnumerable<T>)

通过引用源初始化 Link<T> 结构的新实例。Initializes a new instance of the Link<T> structure by referencing the source.

Link<T>(Link<T>)

通过从其他 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)

通过引用属性的值初始化 Link<T> 结构的新实例。Initializes a new instance of the Link<T> structure by referencing the value of the property.

属性

HasLoadedOrAssignedValue

指定 Link<T> 是否已加载或分配某值。Specifies whether the Link<T> has loaded or assigned a value.

HasValue

获取指示源是否包含值的值。Gets a value that specifies whether the source has a value.

Value

获取或设置分配给 Link<T> 或由其加载的值。Gets or sets the value assigned to or loaded by the Link<T>.

适用于

另请参阅