Exemplo n.º 1
0
 protected override void OnStop()
 {
     try{
         SockPkg.StopListen();
         EventLog.WriteEntry("Serviço parado com sucesso", EventLogEntryType.Information);
     }
     catch (SocketException se) {
         EventLog.WriteEntry(string.Format("Código: {0} - MsgErro: {1} ", se.ErrorCode.ToString(), se.Message), EventLogEntryType.Error);
     }
     catch (Exception ex) {
         EventLog.WriteEntry(string.Format("Source: {0} - MsgErro: {1} ", ex.Source.ToString(), ex.Message), EventLogEntryType.Error);
     }
 }
Exemplo n.º 2
0
 public void PararServico()
 {
     SockPkg.StopListen();
     _ServicoStatus = ServicoStatus.Parado;
 }