public void Dispose() { //lock (locker) { /** Cerrar el Agente SNMP*/ SnmpAgent.Close(); Mib.Dispose(); /** OJO!!! Cerrar el Agente SIP */ //if (LocalAudioPlayer != -1) //{ // SipAgent.DestroyWavPlayer(LocalAudioPlayer); //} SipAgent.End(); LocalAudioPlayer = -1; /** Descargar Datos */ Unload(); } }
/// <summary> /// /// </summary> public static void End() { if (Settings.Default.SNMPEnabled == 1) { SnmpIntObject.Get(Settings.Default.TopStOid).Value = 0; SnmpIntObject.Get(Settings.Default.TopOid).Value = -1; // Tipo de elemento Hw: -1 => Error } if (_WorkingThread != null) { _WorkingThread.Stop(); } if (_PublisherThread != null) { _PublisherThread.Stop(); } if (_MixerManager != null) { _MixerManager.End(); } if (_RdManager != null) { _RdManager.End(); } if (_LcManager != null) { _LcManager.End(); } if (_TlfManager != null) { _TlfManager.End(); } if (_SipManager != null) { _SipManager.End(); } if (_CfgManager != null) { _CfgManager.End(); } if (_Registry != null) { _Registry.End(); } //if (_MixerManager != null) //{ // _MixerManager.End(); //} if (_RecorderManager != null) { _RecorderManager.End(); } if (_HwManager != null) { _HwManager.End(); } if (Settings.Default.SNMPEnabled == 1) { SnmpAgent.Close(); } #if _NICMON_V0_ /** 20170309. AGL. No se cerraban los TIMER. */ NetworkIFSupervisor.Enabled = false; NetworkIFSupervisor.Elapsed -= NetworkChange_NetworkAvailabilityChanged; #else if (mon != null) { mon.Dispose(); mon = null; } #endif NtpClientSupervisor.Enabled = false; NtpClientSupervisor.Elapsed -= NtpClientSupervisor_tick; /*****************/ }