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

@ -2,7 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using System.Text.Encodings.Web;
using Microsoft.AspNet.Routing; using Microsoft.AspNet.Routing;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Microsoft.Extensions.DependencyInjection namespace Microsoft.Extensions.DependencyInjection
{ {
@ -25,6 +27,7 @@ namespace Microsoft.Extensions.DependencyInjection
throw new ArgumentNullException(nameof(setupAction)); throw new ArgumentNullException(nameof(setupAction));
} }
services.TryAddSingleton(UrlEncoder.Default);
services.Configure(setupAction); services.Configure(setupAction);
} }
} }