/// <summary>
        /// Creates a new instance of the <see cref="HeaderPropagationMessageHandler"/>.
        /// </summary>
        /// <param name="options">The options that define which headers are propagated.</param>
        /// <param name="values">The values of the headers to be propagated populated by the
        /// <see cref="HeaderPropagationMiddleware"/>.</param>
        public HeaderPropagationMessageHandler(IOptions <HeaderPropagationOptions> options, HeaderPropagationValues values)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _options = options.Value;

            _values = values ?? throw new ArgumentNullException(nameof(values));
        }
Beispiel #2
0
        public HeaderPropagationMiddleware(RequestDelegate next, IOptions <HeaderPropagationOptions> options, HeaderPropagationValues values)
        {
            _next = next ?? throw new ArgumentNullException(nameof(next));

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }
            _options = options.Value;

            _values = values ?? throw new ArgumentNullException(nameof(values));
        }