// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Net.Http; using Microsoft.AspNetCore.Mvc.ModelBinding; namespace Microsoft.AspNetCore.Mvc.WebApiCompatShim { /// /// implementation to bind models of type . /// public class HttpRequestMessageModelBinderProvider : IModelBinderProvider { /// public IModelBinder GetBinder(ModelBinderProviderContext context) { if (context.Metadata.ModelType == typeof(HttpRequestMessage)) { return new HttpRequestMessageModelBinder(); } return null; } } }