EagerLoad(Boolean) Constructor
Create an EagerLoad object with all options on or off
Namespace: CoordinateSharpAssembly: CoordinateSharp (in CoordinateSharp.dll) Version: 3.1.1.1
XMLNS for XAML: Not mapped to an xmlns.
public EagerLoad(
bool isOn
)
Parameters
- isOn Boolean
- Turns EagerLoad on or off
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