Adding UrlEncoder to the ServiceCollection

This commit is contained in:
Pranav K 2015-12-17 15:32:51 -08:00
parent ef0ea537e2
commit 37c167aa74
2 changed files with 5 additions and 2 deletions

View File

@ -108,8 +108,8 @@ namespace Microsoft.AspNet.Builder
}
var inlineConstraintResolver = routeBuilder
.ServiceProvider
.GetRequiredService<IInlineConstraintResolver>();
.ServiceProvider
.GetRequiredService<IInlineConstraintResolver>();
routeBuilder.Routes.Add(new Route(
routeBuilder.DefaultHandler,

View File

@ -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);
}
}