コード例 #1
0
 /// <summary>
 /// OnLoad
 /// </summary>
 protected override void OnLoad()
 {
     base.OnLoad();
     AgentManager.StartController();
 }
コード例 #2
0
        //[PermissionSet(SecurityAction.Assert, Unrestricted = true)]
        private void InternalStart()
        {
            try
            {
                //System.Security.SecurityRules(RuleSet=System.Security.SecurityRuleSet.Level2)

                //using (FileStream fs = new FileStream(@"D:\Nistec\Services\Logs\qlog.log", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite))
                //{
                //    StreamWriter w = new StreamWriter(fs);     // create a Char writer
                //    w.BaseStream.Seek(0, SeekOrigin.End);      // set the file pointer to the end
                //    w.Write("log test" + "\r\n");
                //    w.Flush();  // update underlying file
                //}

                Netlog.Debug(serviceName + " start...");

                AgentManager.Start();

                //m_ServerEnqueue = new PipeServerEnqueue();
                //m_ServerEnqueue.Start(false);

                //m_ServerDequeue = new PipeServerDequeue();
                //m_ServerDequeue.Start(false);


                //if (AgentManager.Settings.EnableQueueManager)
                //{
                //    m_ServerQueueManager = new PipeServerManager();
                //    m_ServerQueueManager.Start(false);
                //}
                //if (AgentManager.Settings.EnableTcpListener)
                //{
                m_TcpServer = new TcpServerListener();
                if (m_TcpServer.Adapters.Count > 0)
                {
                    //m_TcpServer.Start();
                }

                m_TcpServer.Start();
                //}
                //if (AgentManager.Settings.EnableFolderListener)
                //{
                //    m_FolderServer = new FolderServerListener();
                //    m_FolderServer.Start();
                //}
                //if (AgentManager.Settings.EnableDbListener)
                //{
                //    m_DbServer = new DbServerListener();
                //    m_DbServer.Start();
                //}

                //svr.Start();//McLock.Lock.ValidateLock(), true);
                //host_serviceStart();
                Netlog.Debug(serviceName + " started!");
            }
            catch (Exception ex)
            {
                Netlog.Exception(serviceName + " InternalStart error ", ex, true, true);

                //File.AppendAllText(@"D:\Nistec\Services\MQueue.Agent\error.log", "error: " + ex.Message);
            }
        }
コード例 #3
0
 /// <summary>
 /// OnStop
 /// </summary>
 protected override void OnStop()
 {
     base.OnStop();
     AgentManager.StopController();
     Log.Info("HttpServerChannel stoped :{0}, QueueChannel:{1}", this.Settings.HostName, QueueChannel.ToString());
 }
コード例 #4
0
ファイル: PipeServerChannel.cs プロジェクト: nistec/MQueue
 /// <summary>
 /// OnStop
 /// </summary>
 protected override void OnStop()
 {
     base.OnStop();
     AgentManager.StopController();
     QLogger.Info("PipeServerChannel stoped :{0}, QueueChannel:{1}", PipeName, QueueChannel.ToString());
 }