Click or drag to resize

EagerLoad Constructor (Boolean)

Create an EagerLoad object with all options on or off

Namespace:  CoordinateSharp
Assembly:  CoordinateSharp (in CoordinateSharp.dll) Version: 2.12.1.1
Syntax
C#
public EagerLoad(
	bool isOn
)

Parameters

isOn
Type: SystemBoolean
Turns EagerLoad on or off
Examples
The following example turns off eagerloading for a Coordinate objects UTM/MGRS, Cartesian/ECEF and CelestialInfo properties.
//Create an EagerLoading object with all properties turned off.
//(All properties will now be set to lazy load).
EagerLoad el = new EagerLoad(false);

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

//Load celestial information when ready.
//Failure to do this will cause NullReference Exceptions in the Coordinate objects CelestialInfo Property.
coord.LoadCelestialInfo();

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