コード例 #1
0
 protected override void OnStop()
 {
     plugins.ForEach(p =>
     {
         log.Debug($"Остановка {(p.IsSync ? "синхронного" : "асинхронного")} обработчика для кода запроса \"{p.RequestCode}\"");
         processHostManager.Remove(p.RequestCode, p.IsSync);
     });
     log.Info("Служба остановлена");
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: KpdApps/Orationi.Messaging
        /// <summary>
        /// Process single plugin. Method for debugging mostly.
        /// </summary>
        /// <param name="processHostManager">RabbitMQ Instance</param>
        /// <param name="requestCode">Reqeust code number to be processed</param>
        private static void SingleRequestCodeProcessing(ProcessHostManager processHostManager, int requestCode)
        {
            processHostManager.Add(requestCode, IsSync);

            Console.WriteLine($"Processing RequestCode {requestCode}");
            Console.WriteLine("Press [enter] to stop.");
            Console.ReadLine();

            processHostManager.Remove(requestCode, IsSync);
        }