Export (0) Print
Expand All

HttpActionContextExtensions.GetValidators Method

Retrieves the collection of registered ModelValidator instances.

Namespace:  System.Web.Http.Controllers
Assembly:  System.Web.Http (in System.Web.Http.dll)

public static IEnumerable<ModelValidator> GetValidators(
	this HttpActionContext actionContext,
	ModelMetadata metadata
)

Parameters

actionContext
Type: System.Web.Http.Controllers.HttpActionContext
The context.
metadata
Type: System.Web.Http.Metadata.ModelMetadata
The metadata.

Return Value

Type: System.Collections.Generic.IEnumerable<ModelValidator>
A collection of registered ModelValidator instances.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HttpActionContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see http://msdn.microsoft.com/en-us/library/bb384936(v=vs.108).aspx or http://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).aspx.
Show:
© 2014 Microsoft