Partager via


HttpActionContextExtensions.GetValidatorProviders Method

Retrieves the collection of registered ModelValidatorProvider instances.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function GetValidatorProviders ( _
    actionContext As HttpActionContext _
) As IEnumerable(Of ModelValidatorProvider)
'Usage
Dim actionContext As HttpActionContext
Dim returnValue As IEnumerable(Of ModelValidatorProvider)

returnValue = actionContext.GetValidatorProviders()
public static IEnumerable<ModelValidatorProvider> GetValidatorProviders(
    this HttpActionContext actionContext
)
[ExtensionAttribute]
public:
static IEnumerable<ModelValidatorProvider^>^ GetValidatorProviders(
    HttpActionContext^ actionContext
)
static member GetValidatorProviders : 
        actionContext:HttpActionContext -> IEnumerable<ModelValidatorProvider> 
public static function GetValidatorProviders(
    actionContext : HttpActionContext
) : IEnumerable<ModelValidatorProvider>

Parameters

Return Value

Type: System.Collections.Generic.IEnumerable<ModelValidatorProvider>
A collection of ModelValidatorProvider 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 https://msdn.microsoft.com/en-us/library/bb384936(v=vs.108) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).

See Also

Reference

HttpActionContextExtensions Class

System.Web.Http.Controllers Namespace