Beispiel #1
0
        //*****************************************************************************


        /// <summary>
        /// Dealing with server closing
        /// </summary>
        public void ServerClosing()
        {
            //close server event
            CloseServer?.Invoke(this, null);
            //write to log
            this.m_logging.Log("Closing server", MessageTypeEnum.INFO);
        }
 /// <summary>
 /// When closing server.
 /// </summary>
 public void OnCloseServer()
 {
     //Close handlers.
     CloseServer?.Invoke(this, null);
     //Write to log.
     m_logging.Log("Server closed", MessageTypeEnum.INFO);
 }
Beispiel #3
0
 /// <summary>
 /// Called when the service closed and closing all the handlers.
 /// </summary>
 public void OnCloseServer()
 {
     try {
         CloseServer?.Invoke(this, null);
         this.m_logging.Log("The CloseServer function succeeded", Logging.Modal.MessageTypeEnum.INFO);
     } catch {
         this.m_logging.Log("There is a problem to close the server", Logging.Modal.MessageTypeEnum.FAIL);
     }
 }
 /// <summary>
 /// deals with closing the server.
 /// </summary>
 public void OnCloseServer()
 {
     try
     {
         CloseServer?.Invoke(this, null);
         m_logging.Log("Handlers notified.", MessageTypeEnum.INFO);
     }
     catch (Exception e)
     {
         this.m_logging.Log("Failed to notify handler due to: " + e.Message, MessageTypeEnum.FAIL);
     }
 }
 /// <summary>
 /// In case the server is closed
 /// </summary>
 public void OnCloseServer()
 {
     try
     {
         CloseServer?.Invoke(this, null);
         model_logging.Log("Notified handler", MessageTypeEnum.INFO);
     }
     catch (Exception e)
     {
         this.model_logging.Log("Handler notification error" + e.Message, MessageTypeEnum.FAIL);
     }
 }
Beispiel #6
0
 /// <summary>
 /// OnCloseServer function.
 /// defines what happens when we close the server
 /// </summary>
 public void OnCloseServer()
 {
     try
     {
         m_logging.Log("Enter OnCloseServer", MessageTypeEnum.INFO);
         CloseServer?.Invoke(this, null);
         m_logging.Log("Leave OnCloseServer", MessageTypeEnum.INFO);
     }
     catch (Exception ex)
     {
         this.m_logging.Log("OnColeServer Exception: " + ex.ToString(), MessageTypeEnum.FAIL);
     }
 }
Beispiel #7
0
 /// <summary>OnCloseServer - Server closed details</summary>
 public void OnCloseServer()
 {
     //Tries to close the server
     try
     {
         m_logging.Log("Begining OnCloseServer Function", Logging.Modal.MessageTypeEnum.INFO);
         CloseServer?.Invoke(this, null);
         m_logging.Log("Leaving OnCloseServer Function", Logging.Modal.MessageTypeEnum.INFO);
     }
     //Catches an exception in case it didn't work.
     catch (Exception e)
     {
         this.m_logging.Log("Server Close Error: " + e.ToString(), Logging.Modal.MessageTypeEnum.FAIL);
     }
 }