Click or drag to resize

EagerLoad Constructor

Creates a default EagerLoad object.

Namespace:  CoordinateSharp
Assembly:  CoordinateSharp (in CoordinateSharp.dll) Version: 2.12.1.1
Syntax
C#
public EagerLoad()
Remarks
All properties are set with eager loading turned on.
Examples
The following example turns off eager loading for a Coordinate objects CelestialInfo property.
//Create a default EagerLoading object.
EagerLoad el = new EagerLoad();

//Turn of eagerloading of celestial information.
el.Celestial = 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