internal ShipyardBuyEvent InvokeEvent(ShipyardBuyEvent arg) { if (_api.ValidateEvent(arg)) { ShipyardBuy?.Invoke(_api, arg); } return(arg); }
private static void AssertEvent(ShipyardBuyEvent @event) { Assert.NotNull(@event); Assert.Equal(DateTime.Parse("2019-08-30T14:10:31Z"), @event.Timestamp); Assert.Equal(EventName, @event.Event); Assert.Equal("adder", @event.ShipType); Assert.Equal(ShipModel.Adder, @event.ShipModel); Assert.Equal(87808, @event.ShipPrice); Assert.Equal("SideWinder", @event.StoreOldShip); Assert.Equal(0, @event.StoreShipId); Assert.Equal(3223919616, @event.MarketId); }
private async void StationOnShipyardBuyAsync(object sender, ShipyardBuyEvent e) { var request = StartRequest(); if (e.StoreShipId.HasValue) { AddCommand(new SetCommanderShip(e.StoreOldShip, e.StoreShipId.Value) { StarSystem = _eliteAPI.Location?.StarSystem?.Name, Station = _eliteAPI.Location?.Station?.Name }); } else if (e.SellShipID.HasValue) { AddCommand(new RemoveCommanderShip(e.SellOldShip, e.SellShipID.Value)); } await request.SendAsync().ConfigureAwait(false); }
internal void InvokeShipyardBuyEvent(ShipyardBuyEvent arg) { ShipyardBuyEvent?.Invoke(this, arg); }
internal void InvokeShipyardBuyEvent(ShipyardBuyEvent arg) => ShipyardBuyEvent?.Invoke(null, arg);