internal StoredShipsEvent InvokeEvent(StoredShipsEvent arg) { if (_api.ValidateEvent(arg)) { StoredShips?.Invoke(_api, arg); } return(arg); }
private IEnumerable <ApiEvent> ConvertEvent(StoredShips e) { foreach (var ship in e.ShipsHere) { var @event = new ApiEvent("setCommanderShip") { Timestamp = e.Timestamp, EventData = new Dictionary <string, object>() { { "shipType", ship.ShipType }, { "shipGameID", ship.ShipId }, { "marketID", e.MarketId }, { "starsystemName", e.StarSystem }, { "stationName", e.StationName }, { "isCurrentShip", false }, { "isHot", ship.Hot } } }; yield return(@event); } foreach (var ship in e.ShipsRemote) { var @event = new ApiEvent("setCommanderShip") { Timestamp = e.Timestamp, EventData = new Dictionary <string, object>() { { "shipType", ship.ShipType }, { "shipGameID", ship.ShipId }, { "marketID", ship.ShipMarketId }, { "starsystemName", ship.StarSystem }, { "isCurrentShip", false }, { "isHot", ship.Hot }, } }; yield return(@event); } }