No need to add an instance in `WebApiCompatShimMvcBuilderExtensions`
- DI has changed since this class was written
This commit is contained in:
parent
93735a5be6
commit
29a25b2ed1
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue