private void OnEventReceived(BaseEvent ommEvent) { if (ommEvent == null) { return; } if (ommEvent is EventDECTSubscriptionMode dectSubscriptionMode) { DECTSubscriptionModeChanged?.Invoke(this, new OmmEventArgs <EventDECTSubscriptionMode>(dectSubscriptionMode)); } else if (ommEvent is EventAlarmCallProgress alarmCallProgress) { AlarmCallProgress?.Invoke(this, new OmmEventArgs <EventAlarmCallProgress>(alarmCallProgress)); } else if (ommEvent is EventRFPSummary rfpSummary) { RfpSummary?.Invoke(this, new OmmEventArgs <EventRFPSummary>(rfpSummary)); } else if (ommEvent is EventPPDevSummary ppDevSummary) { PPDevSummary?.Invoke(this, new OmmEventArgs <EventPPDevSummary>(ppDevSummary)); } else if (ommEvent is EventPPUserSummary ppUserSummary) { PPUserSummary?.Invoke(this, new OmmEventArgs <EventPPUserSummary>(ppUserSummary)); } else if (ommEvent is EventPPDevCnf ppDevCnf) { PPDevCnf?.Invoke(this, new OmmEventArgs <EventPPDevCnf>(ppDevCnf)); } else if (ommEvent is EventPPUserCnf ppUserCnf) { PPUserCnf?.Invoke(this, new OmmEventArgs <EventPPUserCnf>(ppUserCnf)); } else if (ommEvent is EventPPCnf ppCnf) { PPCnf?.Invoke(this, new OmmEventArgs <EventPPCnf>(ppCnf)); } else if (ommEvent is EventRFPState rfpState) { RFPState?.Invoke(this, new OmmEventArgs <EventRFPState>(rfpState)); } else if (ommEvent is EventRFPCnf rfpCnf) { RFPCnf?.Invoke(this, new OmmEventArgs <EventRFPCnf>(rfpCnf)); } else if (ommEvent is EventRFPSyncRel rfpSyncRel) { RFPSyncRel?.Invoke(this, new OmmEventArgs <EventRFPSyncRel>(rfpSyncRel)); } else if (ommEvent is EventRFPSyncQuality rfpSyncQuality) { RFPSyncQuality?.Invoke(this, new OmmEventArgs <EventRFPSyncQuality>(rfpSyncQuality)); } else if (ommEvent is EventStbStateChange stbStateChange) { StbStateChange?.Invoke(this, new OmmEventArgs <EventStbStateChange>(stbStateChange)); } else if (ommEvent is EventLicenseCnf licenseCnf) { LicenseCnf?.Invoke(this, new OmmEventArgs <EventLicenseCnf>(licenseCnf)); } else if (ommEvent is EventMessageProgress messageProgress) { MessageProgress?.Invoke(this, new OmmEventArgs <EventMessageProgress>(messageProgress)); } else if (ommEvent is EventMessageConfirmation messageConfirmation) { MessageConfirmation?.Invoke(this, new OmmEventArgs <EventMessageConfirmation>(messageConfirmation)); } else if (ommEvent is EventMessageQueueEmpty messageQueueEmpty) { MessageQueueEmpty?.Invoke(this, new OmmEventArgs <EventMessageQueueEmpty>(messageQueueEmpty)); } else if (ommEvent is EventMessageSend messageSend) { MessageSend?.Invoke(this, new OmmEventArgs <EventMessageSend>(messageSend)); } else if (ommEvent is EventPositionHistory positionHistory) { PositionHistory?.Invoke(this, new OmmEventArgs <EventPositionHistory>(positionHistory)); } else if (ommEvent is EventPositionInfo positionInfo) { PositionInfo?.Invoke(this, new OmmEventArgs <EventPositionInfo>(positionInfo)); } else if (ommEvent is EventPositionTrack positionTrack) { PositionTrack?.Invoke(this, new OmmEventArgs <EventPositionTrack>(positionTrack)); } else if (ommEvent is EventPositionRequest positionRequest) { PositionRequest?.Invoke(this, new OmmEventArgs <EventPositionRequest>(positionRequest)); } else if (ommEvent is EventPPState ppState) { PPState?.Invoke(this, new OmmEventArgs <EventPPState>(ppState)); } else if (ommEvent is EventDECTAuthCodeCnf dectAuthCodeCnf) { DECTAuthCodeCnf?.Invoke(this, new OmmEventArgs <EventDECTAuthCodeCnf>(dectAuthCodeCnf)); } }