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(
|
builder.Services.TryAddEnumerable(
|
||||||
ServiceDescriptor.Transient<IConfigureOptions<WebApiCompatShimOptions>, WebApiCompatShimOptionsSetup>());
|
ServiceDescriptor.Transient<IConfigureOptions<WebApiCompatShimOptions>, WebApiCompatShimOptionsSetup>());
|
||||||
|
|
||||||
// The constructors on DefaultContentNegotiator aren't DI friendly, so just
|
builder.Services.TryAddSingleton<IContentNegotiator, DefaultContentNegotiator>();
|
||||||
// new it up.
|
|
||||||
builder.Services.TryAdd(ServiceDescriptor.Instance<IContentNegotiator>(new DefaultContentNegotiator()));
|
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue