private async void StationEventsOnShipyardTransferAsync(object sender, ShipyardTransferEvent e) =>
 await AddCommand(new SetCommanderShipTransfer(e.ShipType, e.ShipId, _eliteAPI.Location?.StarSystem?.Name, _eliteAPI.Location?.Station?.Name)
 {
     MarketId     = _eliteAPI.Location?.Station?.MarketId,
     TransferTime = e.TransferTime > 0 ? e.TransferTime : (long?)null
 }).SendAsync()
 .ConfigureAwait(false);
Exemple #2
0
 internal ShipyardTransferEvent InvokeEvent(ShipyardTransferEvent arg)
 {
     if (_api.ValidateEvent(arg))
     {
         ShipyardTransfer?.Invoke(_api, arg);
     }
     return(arg);
 }
 private static void AssertEvent(ShipyardTransferEvent @event)
 {
     Assert.NotNull(@event);
     Assert.Equal(DateTime.Parse("2016-07-21T15:19:49Z"), @event.Timestamp);
     Assert.Equal(EventName, @event.Event);
     Assert.Equal("SideWinder", @event.ShipType);
     Assert.Equal(ShipModel.Sidewinder, @event.ShipModel);
     Assert.Equal(7, @event.ShipId);
     Assert.Equal(580, @event.TransferPrice);
     Assert.Equal("Eranin", @event.System);
     Assert.Equal(85.639145, @event.Distance, 6);
 }
Exemple #4
0
 internal void InvokeShipyardTransferEvent(ShipyardTransferEvent arg)
 {
     ShipyardTransferEvent?.Invoke(this, arg);
 }
Exemple #5
0
 internal void InvokeShipyardTransferEvent(ShipyardTransferEvent arg) => ShipyardTransferEvent?.Invoke(null, arg);