Beispiel #1
0
 internal ShipyardSwapEvent InvokeEvent(ShipyardSwapEvent arg)
 {
     if (_api.ValidateEvent(arg))
     {
         ShipyardSwap?.Invoke(_api, arg);
     }
     return(arg);
 }
Beispiel #2
0
 private static void AssertEvent(ShipyardSwapEvent @event)
 {
     Assert.NotNull(@event);
     Assert.Equal(DateTime.Parse("2016-07-21T14:36:06Z"), @event.Timestamp);
     Assert.Equal(EventName, @event.Event);
     Assert.Equal("sidewinder", @event.ShipType);
     Assert.Equal(ShipModel.Sidewinder, @event.ShipModel);
     Assert.Equal(2, @event.StoreShipId);
     Assert.Equal("Asp", @event.StoreOldShip);
 }
 private async void StationOnShipyardSwapAsync(object sender, ShipyardSwapEvent e) =>
 await AddCommand(new SetCommanderShip(e.StoreOldShip, e.StoreShipId)
 {
     StarSystem = _eliteAPI.Location?.StarSystem?.Name,
     Station    = _eliteAPI.Location?.Station?.Name
 })
 .AddCommand(new SetCommanderShip(e.ShipType, e.ShipId)
 {
     IsCurrent = true
 })
 .SendAsync()
 .ConfigureAwait(false);
Beispiel #4
0
 internal void InvokeShipyardSwapEvent(ShipyardSwapEvent arg)
 {
     ShipyardSwapEvent?.Invoke(this, arg);
 }
Beispiel #5
0
 internal void InvokeShipyardSwapEvent(ShipyardSwapEvent arg) => ShipyardSwapEvent?.Invoke(null, arg);