コード例 #1
0
        /// <summary>
        /// Constructs a new instance.
        /// </summary>
        /// <param name="httpConfiguration">The <see cref="HttpExtensionConfiguration"/>.</param>
        /// <param name="traceWriter">The <see cref="TraceWriter"/> to use.</param>
        public HttpRequestManager(HttpExtensionConfiguration httpConfiguration, TraceWriter traceWriter)
        {
            Config      = httpConfiguration;
            TraceWriter = traceWriter;

            if (Config.MaxOutstandingRequests != DataflowBlockOptions.Unbounded ||
                Config.MaxConcurrentRequests != DataflowBlockOptions.Unbounded)
            {
                InitializeRequestQueue();
            }
        }
コード例 #2
0
        /// <summary>
        /// Constructs a new instance.
        /// </summary>
        /// <param name="httpConfiguration">The <see cref="HttpExtensionConfiguration"/>.</param>
        /// <param name="traceWriter">The <see cref="TraceWriter"/> to use.</param>
        public HttpRequestManager(HttpExtensionConfiguration httpConfiguration, ILoggerFactory loggerFactory)
        {
            Config = httpConfiguration;
            Logger = loggerFactory?.CreateLogger("Host.Extensions.HttpRequestManager");

            if (Config.MaxOutstandingRequests != DataflowBlockOptions.Unbounded ||
                Config.MaxConcurrentRequests != DataflowBlockOptions.Unbounded)
            {
                InitializeRequestQueue();
            }
        }