EagerLoad(EagerLoadType) Constructor

Creates an EagerLoad object. Only the specified flags will be set to eager load.

Definition

Namespace: CoordinateSharp
Assembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
C#
public EagerLoad(
	EagerLoadType et
)

Parameters

et  EagerLoadType
EagerLoadType

Example

The following example sets CelestialInfo and Cartesian properties to eager load. Other conversions will be lazy loaded.
C#
//Create an EagerLoading object with only CelestialInfo and Cartesian properties set to eager load.
EagerLoad el = new EagerLoad(EagerLoadType.Celestial | EagerLoadType.Cartesian);

//Create coordinate with defined eagerloading settings.
Coordinate coord = new Coordinate(25, 25, new DateTime(2018, 3, 2), el);

//Display UTC sunset time at the location.
Console.WriteLine(coord.CelestialInfo.SunSet); //3/2/2018 4:23:46 PM
Console.WriteLine(coord.Cartesian); //0.8213938 0.38302222 0.42261826

//Load UTM_MGRS when ready.
coord.LoadUTM_MGRS_Info();
Console.WriteLine(coord.UTM); //35R 298154mE 2766437mN

See Also