HeaderPropagation middleware: small cleanup

- Removed MessageHandler DI registration as not needed.
- Fixed two parameters XML descriptions.
- Cleaned up usings in the example.
This commit is contained in:
Alessio Franceschelli 2019-05-29 00:10:08 +01:00 committed by Ryan Nowak
parent e39b4b5c3e
commit abd70031cb
4 changed files with 2 additions and 7 deletions

View File

@ -1,4 +1,3 @@
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;

View File

@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.HeaderPropagation;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;

View File

@ -23,7 +23,6 @@ namespace Microsoft.Extensions.DependencyInjection
}
services.TryAddSingleton<HeaderPropagationValues>();
services.TryAddTransient<HeaderPropagationMessageHandler>();
return services;
}

View File

@ -36,7 +36,7 @@ namespace Microsoft.AspNetCore.HeaderPropagation
/// <param name="headerName">The header name to be propagated.</param>
/// <param name="valueFilter">
/// A filter delegate that can be used to transform the header value.
/// <see cref="HeaderPropagationEntry.ValueFilter"/>.
/// See <see cref="HeaderPropagationEntry.ValueFilter"/>.
/// </param>
public void Add(string headerName, Func<HeaderPropagationContext, StringValues> valueFilter)
{
@ -85,7 +85,7 @@ namespace Microsoft.AspNetCore.HeaderPropagation
/// </param>
/// <param name="valueFilter">
/// A filter delegate that can be used to transform the header value.
/// <see cref="HeaderPropagationEntry.ValueFilter"/>.
/// See <see cref="HeaderPropagationEntry.ValueFilter"/>.
/// </param>
public void Add(
string inboundHeaderName,