void Mds_OnConnectionOpened(object sender, ConnectionOpenedEventArgs args) { // Obtem alertas cadastrados na base Dictionary <String, DadosAlerta> alertasCadastrados = dbAlertas.ListarAlertas(); if (alertasCadastrados != null && alertasCadastrados.Count > 0) { gerenciadorAlertas.Carregar(alertasCadastrados); RecadastrarInstrumentosMDS(); } }
void Mds_OnConnectionOpened(object sender, ConnectionOpenedEventArgs args) { try { SocketPackage mdsSocket = sender as SocketPackage; // Obtem alertas cadastrados na base Dictionary <String, DadosAlerta> alertasCadastrados = dbAlertas.ListarAlertas(); if (alertasCadastrados != null && alertasCadastrados.Count > 0) { gerenciadorAlertas.Carregar(alertasCadastrados); RecadastrarInstrumentosMDS(mdsSocket); } } catch (Exception ex) { logger.Error("Mds_OnConnectionOpened(): " + ex.Message, ex); } }