Fix obsolete build warning (#8358)

This commit is contained in:
James Newton-King 2018-08-30 08:16:57 +12:00 committed by GitHub
parent 234b003b31
commit 28f96bf832
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -175,8 +175,12 @@ namespace Microsoft.AspNetCore.Mvc.Internal
.SetupGet(o => o.Value)
.Returns(new RouteOptions());
#pragma warning disable CS0618 // Type or member is obsolete
var inlineConstraintResolver = new DefaultInlineConstraintResolver(routeOptions.Object);
#pragma warning restore CS0618 // Type or member is obsolete
var services = new ServiceCollection()
.AddSingleton<IInlineConstraintResolver>(new DefaultInlineConstraintResolver(routeOptions.Object))
.AddSingleton<IInlineConstraintResolver>(inlineConstraintResolver)
.AddSingleton<ObjectPoolProvider, DefaultObjectPoolProvider>();
services.AddSingleton<ObjectPoolProvider, DefaultObjectPoolProvider>();