Adding UrlEncoder to the ServiceCollection
This commit is contained in:
parent
ef0ea537e2
commit
37c167aa74
|
|
@ -108,8 +108,8 @@ namespace Microsoft.AspNet.Builder
|
|||
}
|
||||
|
||||
var inlineConstraintResolver = routeBuilder
|
||||
.ServiceProvider
|
||||
.GetRequiredService<IInlineConstraintResolver>();
|
||||
.ServiceProvider
|
||||
.GetRequiredService<IInlineConstraintResolver>();
|
||||
|
||||
routeBuilder.Routes.Add(new Route(
|
||||
routeBuilder.DefaultHandler,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Text.Encodings.Web;
|
||||
using Microsoft.AspNet.Routing;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection
|
||||
{
|
||||
|
|
@ -25,6 +27,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
throw new ArgumentNullException(nameof(setupAction));
|
||||
}
|
||||
|
||||
services.TryAddSingleton(UrlEncoder.Default);
|
||||
services.Configure(setupAction);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue