public EagerLoad_Extensions(EagerLoad_ExtensionsType et) { Solar_Cycle = false; Lunar_Cycle = false; Solar_Eclipse = false; Lunar_Eclipse = false; Zodiac = false; MGRS = false; if (et.HasFlag(EagerLoad_ExtensionsType.Solar_Cycle)) { Solar_Cycle = true; } if (et.HasFlag(EagerLoad_ExtensionsType.Lunar_Cycle)) { Lunar_Cycle = true; } if (et.HasFlag(EagerLoad_ExtensionsType.Solar_Eclipse)) { Solar_Eclipse = true; } if (et.HasFlag(EagerLoad_ExtensionsType.Lunar_Eclipse)) { Lunar_Eclipse = true; } if (et.HasFlag(EagerLoad_ExtensionsType.Zodiac)) { Zodiac = true; } if (et.HasFlag(EagerLoad_ExtensionsType.MGRS)) { MGRS = true; } }
private static bool Extensions_Null(Celestial cel, EagerLoad_ExtensionsType t) { if (cel.SunSet != null && t != EagerLoad_ExtensionsType.Solar_Cycle) { return(false); } if (cel.MoonSet != null && t != EagerLoad_ExtensionsType.Lunar_Cycle) { return(false); } if (cel.LunarEclipse.NextEclipse.MidEclipse.Year > 0001 && t != EagerLoad_ExtensionsType.Lunar_Eclipse) { return(false); } if (cel.SolarEclipse.NextEclipse.MaximumEclipse.Year > 0001 && t != EagerLoad_ExtensionsType.Solar_Eclipse) { return(false); } if (cel.AstrologicalSigns.MoonName != null && cel.AstrologicalSigns.ZodiacSign != null && t != EagerLoad_ExtensionsType.Zodiac) { return(false); } return(true); }