internal WingJoinEvent InvokeEvent(WingJoinEvent arg)
 {
     if (_api.ValidateEvent(arg))
     {
         WingJoin?.Invoke(_api, arg);
     }
     return(arg);
 }
Example #2
0
        public void PostJournalEvent(object sender, JournalEntryBase journalEntry)
        {
            sender = sender ?? this;
            switch (journalEntry)
            {
            case FSDJump jump:
                Location?.Invoke(sender, jump);
                break;

            case Location location:
                Location?.Invoke(sender, location);
                break;

            case Friends friends:
                Friends?.Invoke(sender, friends);
                break;

            case WingInvite wingInvite:
                WingInvite?.Invoke(sender, wingInvite);
                break;

            case WingJoin wingJoin:
                WingJoin?.Invoke(sender, wingJoin);
                break;

            case WingAdd wingAdd:
                WingAdd?.Invoke(sender, wingAdd);
                break;

            case WingLeave wingLeave:
                WingLeave?.Invoke(sender, wingLeave);
                break;

            case null:
                break;

            default:
                log.Warn($"Unmapped journal event '{journalEntry.GetType().Name}'");
                break;
            }
        }