// 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.Formatting;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.ModelBinding;
namespace System.Web.Http.Validation
{
///
/// Validates the body parameter of an action after the parameter has been read by the .
///
public interface IBodyModelValidator
{
///
/// Determines whether the is valid and adds any validation errors to the 's
///
/// The model to be validated.
/// The to use for validation.
/// The used to provide the model metadata.
/// The within which the model is being validated.
/// The to append to the key for any validation errors.
/// trueif is valid, false otherwise.
bool Validate(object model, Type type, ModelMetadataProvider metadataProvider, HttpActionContext actionContext, string keyPrefix);
}
}