Table of Contents

Class ReflectedHttpActionDescriptor

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

Represents a reflected synchronous or asynchronous action method.

public class ReflectedHttpActionDescriptor : HttpActionDescriptor
Inheritance
ReflectedHttpActionDescriptor
Inherited Members

Constructors

ReflectedHttpActionDescriptor()

Initializes a new instance of the ReflectedHttpActionDescriptor class.

public ReflectedHttpActionDescriptor()

ReflectedHttpActionDescriptor(HttpControllerDescriptor, MethodInfo)

Initializes a new instance of the ReflectedHttpActionDescriptor class with the specified descriptor and method details.

public ReflectedHttpActionDescriptor(HttpControllerDescriptor controllerDescriptor, MethodInfo methodInfo)

Parameters

controllerDescriptor HttpControllerDescriptor

The controller descriptor.

methodInfo MethodInfo

The action-method information.

Properties

ActionName

Gets the name of the action.

public override string ActionName { get; }

Property Value

string

The name of the action.

MethodInfo

Gets or sets the action-method information.

public MethodInfo MethodInfo { get; set; }

Property Value

MethodInfo

The action-method information.

ReturnType

Gets the return type of this method.

public override Type ReturnType { get; }

Property Value

Type

The return type of this method.

SupportedHttpMethods

Gets or sets the supported http methods.

public override Collection<HttpMethod> SupportedHttpMethods { get; }

Property Value

Collection<HttpMethod>

The supported http methods.

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 override Task<object> ExecuteAsync(HttpControllerContext controllerContext, IDictionary<string, object> arguments, CancellationToken cancellationToken)

Parameters

controllerContext HttpControllerContext

The context.

arguments IDictionary<string, object>

The arguments.

cancellationToken CancellationToken

A cancellation token to cancel the action.

Returns

Task<object>

A that once completed will contain the return value of the action.

GetCustomAttributes<T>()

Returns an array of custom attributes defined for this member, identified by type.

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

Returns

Collection<T>

An array of custom attributes or an empty array if no custom attributes exist.

Type Parameters

T

The type of the custom attributes.

GetFilters()

Retrieves information about action filters.

public override Collection<IFilter> GetFilters()

Returns

Collection<IFilter>

The filter information.

GetParameters()

Retrieves the parameters of the action method.

public override Collection<HttpParameterDescriptor> GetParameters()

Returns

Collection<HttpParameterDescriptor>

The parameters of the action method.