예제 #1
0
파일: Service.cs 프로젝트: autojie/pgina
 public Service()
 {
     try
     {
         string pipeName = Core.Settings.Get.ServicePipeName;
         int maxClients = Core.Settings.Get.MaxClients;
         m_logger.DebugFormat("Service created - PipeName: {0} MaxClients: {1}", pipeName, maxClients);
         m_logger.DebugFormat("System Info: {0}", Abstractions.Windows.OsInfo.OsDescription());
         m_server = new PipeServer(pipeName, maxClients, (Func<dynamic, dynamic>)HandleMessage);
         m_logger.DebugFormat("Using plugin directories: ");
         foreach (string dir in PluginDirectories)
             m_logger.DebugFormat("  {0}", dir);
     }
     catch (Exception e)
     {
         EventLog.WriteEntry("pGina", e.ToString(), EventLogEntryType.Error);
         m_logger.ErrorFormat("Service startup error: {0}", e.ToString());
         throw;
     }
 }