public void Process(PipelineArgs args)
 {
     LogTheadPoolConfiguration(args, "Default ThreadPool configuration");
     if (0 != MinWorkerThreads && 0 != MinIOThreads)
     {
         ApplicationThreadPoolConfigurator.SetMinThreads(MinWorkerThreads, MinIOThreads);
     }
     if (0 != MaxWorkerThreads && 0 != MaxIOThreads)
     {
         ApplicationThreadPoolConfigurator.SetMaxThreads(MaxWorkerThreads, MaxIOThreads);
     }
     LogTheadPoolConfiguration(args, "New TreadPool configuration");
 }
        private void LogTheadPoolConfiguration(PipelineArgs args, string header)
        {
            Diagnostics.Assert.ArgumentNotNull(args, "args");
            Diagnostics.Assert.ArgumentNotNull(header, "header");

            int minWorkerThreads, minIoThreads, maxWorkerThreads, maxIoThreads;

            ApplicationThreadPoolConfigurator.GetMinThreads(out minWorkerThreads, out minIoThreads);
            ApplicationThreadPoolConfigurator.GetMaxThreads(out maxWorkerThreads, out maxIoThreads);

            var message = new System.Text.StringBuilder()
                          .AppendLine($"{this.GetType().ToString()}: {header}")
                          .AppendLine("Processor count: " + ProcessorCount)
                          .AppendLine("minWorkerThreads: " + minWorkerThreads)
                          .AppendLine("minIOThreads: " + minIoThreads)
                          .AppendLine("maxWorkerThreads: " + maxWorkerThreads)
                          .AppendLine("maxIOThreads: " + maxIoThreads).ToString();

            Log.Info(message, this);
        }