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);
예제 #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);
 }
예제 #4
0
 internal void InvokeShipyardTransferEvent(ShipyardTransferEvent arg)
 {
     ShipyardTransferEvent?.Invoke(this, arg);
 }
예제 #5
0
 internal void InvokeShipyardTransferEvent(ShipyardTransferEvent arg) => ShipyardTransferEvent?.Invoke(null, arg);