public List <IPlanetEvent> this[SeFlg centric, PlanetEventFlag category] { get { if ((centric != SeFlg.HELIOCENTRIC && centric != SeFlg.GEOCENTRIC) || !PlanetEvent.PlanetEventSymbolToCategory.ContainsValue(category)) { throw new ArgumentOutOfRangeException(); } List <IPlanetEvent> result = new List <IPlanetEvent>(); if (centric == SeFlg.GEOCENTRIC && GeoAspectarian.ContainsKey(category)) { foreach (KeyValuePair <PlanetId, List <IPlanetEvent> > kvp in GeoAspectarian[category]) { if (kvp.Value.Count != 0) { result.AddRange(kvp.Value); } } } else if (centric == SeFlg.HELIOCENTRIC && HelioAspectarian.ContainsKey(category)) { foreach (KeyValuePair <PlanetId, List <IPlanetEvent> > kvp in HelioAspectarian[category]) { if (kvp.Value.Count != 0) { result.AddRange(kvp.Value); } } } return((result.Count == 0) ? null : result); } }
public List <IPlanetEvent> this[SeFlg centric, PlanetEventFlag category, PlanetId id] { get { if ((centric != SeFlg.HELIOCENTRIC && centric != SeFlg.GEOCENTRIC) || !PlanetEvent.PlanetEventSymbolToCategory.ContainsValue(category)) { throw new ArgumentOutOfRangeException(); } if (centric == SeFlg.GEOCENTRIC && GeoAspectarian.ContainsKey(category) && GeoAspectarian[category].ContainsKey(id)) { return(GeoAspectarian[category][id]); } else if (centric == SeFlg.HELIOCENTRIC && HelioAspectarian.ContainsKey(category) && HelioAspectarian[category].ContainsKey(id)) { return(HelioAspectarian[category][id]); } return(null); } }