No need to add an instance in `WebApiCompatShimMvcBuilderExtensions`

- DI has changed since this class was written
This commit is contained in:
Doug Bunting 2015-09-13 19:40:27 -07:00
parent 93735a5be6
commit 29a25b2ed1
1 changed files with 1 additions and 3 deletions

View File

@ -18,9 +18,7 @@ namespace Microsoft.Framework.DependencyInjection
builder.Services.TryAddEnumerable(
ServiceDescriptor.Transient<IConfigureOptions<WebApiCompatShimOptions>, WebApiCompatShimOptionsSetup>());
// The constructors on DefaultContentNegotiator aren't DI friendly, so just
// new it up.
builder.Services.TryAdd(ServiceDescriptor.Instance<IContentNegotiator>(new DefaultContentNegotiator()));
builder.Services.TryAddSingleton<IContentNegotiator, DefaultContentNegotiator>();
return builder;
}