Click or drag to resize

ILazyObject Interface

Preloadable elements are values of delayed-loading properties, which have the ability to be fast-preloaded before accessing them for lists of objects.

Namespace:  Aloe.SystemFrameworks.Domain
Assembly:  Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntax
public interface ILazyObject

The ILazyObject type exposes the following members.

Properties
  NameDescription
Public propertyCheckPreloadStatusFirst
Gets a value indicating whether the framework should first check the preload status for each object, passing to preload only the not-loaded objects.
Public propertySplitObjectList
Top
Methods
  NameDescription
Public methodNeedsLoading
Returns true when the speicfied ILazyObject needs loading.
Public methodPreloadFromDataSourceTElement
Performs a physical preload of the delay-loaded property values for the specified list of preloadable objects.
Top
Remarks

Delayed-loaded properties are properties, which load their value for some object upon first access. Preloading is performance technique, used for delayed-loaded properties, which allows mass loading of the values of such properties.

The primary usage of preloading is before accessing a delay-loaded property in a loop. For example:

//.CustomProperties is a delay-loaded property
customers.Preload(c => c.CustomProperties);

//this will run fast, because .CustomProperties are preloaded
foreach(var c in customers)
{
  Console.WriteLine(c.CustomProperties);
}
See Also