Table of Contents

Class HttpActionDescriptor

Namespace
System.Web.Http.Controllers
Assembly
System.Web.Http.dll

Provides information about the action methods.

public abstract class HttpActionDescriptor
Inheritance
HttpActionDescriptor
Derived
Inherited Members

Constructors

HttpActionDescriptor()

Initializes a new instance of the HttpActionDescriptor class.

protected HttpActionDescriptor()

HttpActionDescriptor(HttpControllerDescriptor)

Initializes a new instance of the HttpActionDescriptor class with specified information that describes the controller of the action.

protected HttpActionDescriptor(HttpControllerDescriptor controllerDescriptor)

Parameters

controllerDescriptor HttpControllerDescriptor

The information that describes the controller of the action.

Properties

ActionBinding

Gets or sets the binding that describes the action.

public virtual HttpActionBinding ActionBinding { get; set; }

Property Value

HttpActionBinding

The binding that describes the action.

ActionName

Gets the name of the action.

public abstract string ActionName { get; }

Property Value

string

The name of the action.

Configuration

Gets or sets the action configuration.

public HttpConfiguration Configuration { get; set; }

Property Value

HttpConfiguration

The action configuration.

ControllerDescriptor

Gets the information that describes the controller of the action.

public HttpControllerDescriptor ControllerDescriptor { get; set; }

Property Value

HttpControllerDescriptor

The information that describes the controller of the action.

Properties

Gets the properties associated with this instance.

public virtual ConcurrentDictionary<object, object> Properties { get; }

Property Value

ConcurrentDictionary<object, object>

The properties associated with this instance.

ResultConverter

Gets the converter for correctly transforming the result of calling System.Web.Http.Controllers.HttpActionDescriptor.ExecuteAsync(System.Web.Http.Controllers.HttpControllerContext,System.Collections.Generic.IDictionary{System.String,System.Object})" into an instance of HttpResponseMessage.

public virtual IActionResultConverter ResultConverter { get; }

Property Value

IActionResultConverter

The action result converter.

ReturnType

Gets the return type of the descriptor.

public abstract Type ReturnType { get; }

Property Value

Type

The return type of the descriptor.

SupportedHttpMethods

Gets the collection of supported HTTP methods for the descriptor.

public virtual Collection<HttpMethod> SupportedHttpMethods { get; }

Property Value

Collection<HttpMethod>

The collection of supported HTTP methods for the descriptor.

Methods

ExecuteAsync(HttpControllerContext, IDictionary<string, object>, CancellationToken)

Executes the described action and returns a Task<TResult> that once completed will contain the return value of the action.

public abstract Task<object> ExecuteAsync(HttpControllerContext controllerContext, IDictionary<string, object> arguments, CancellationToken cancellationToken)

Parameters

controllerContext HttpControllerContext

The controller context.

arguments IDictionary<string, object>

A list of arguments.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<object>

A Task<TResult> that once completed will contain the return value of the action.

GetCustomAttributes<T>()

Returns the custom attributes associated with the action descriptor.

public virtual Collection<T> GetCustomAttributes<T>() where T : class

Returns

Collection<T>

The custom attributes associated with the action descriptor.

Type Parameters

T

The action descriptor.

GetFilterPipeline()

Retrieves the filters for the given configuration and action.

public virtual Collection<FilterInfo> GetFilterPipeline()

Returns

Collection<FilterInfo>

The filters for the given configuration and action.

GetFilters()

Retrieves the filters for the action descriptor.

public virtual Collection<IFilter> GetFilters()

Returns

Collection<IFilter>

The filters for the action descriptor.

GetParameters()

Retrieves the parameters for the action descriptor.

public abstract Collection<HttpParameterDescriptor> GetParameters()

Returns

Collection<HttpParameterDescriptor>

The parameters for the action descriptor.