Class HttpControllerDescriptor
- Namespace
- System.Web.Http.Controllers
- Assembly
- System.Web.Http.dll
Represents information that describes the HTTP controller.
public class HttpControllerDescriptor
- Inheritance
-
HttpControllerDescriptor
- Inherited Members
Constructors
HttpControllerDescriptor()
Initializes a new instance of the HttpControllerDescriptor class.
public HttpControllerDescriptor()
HttpControllerDescriptor(HttpConfiguration, string, Type)
Initializes a new instance of the HttpControllerDescriptor class.
public HttpControllerDescriptor(HttpConfiguration configuration, string controllerName, Type controllerType)
Parameters
configurationHttpConfigurationThe configuration.
controllerNamestringThe controller name.
controllerTypeTypeThe controller type.
Properties
Configuration
Gets or sets the configurations associated with the controller.
public HttpConfiguration Configuration { get; set; }
Property Value
- HttpConfiguration
The configurations associated with the controller.
ControllerName
Gets or sets the name of the controller.
public string ControllerName { get; set; }
Property Value
- string
The name of the controller.
ControllerType
Gets or sets the type of the controller.
public Type ControllerType { get; set; }
Property Value
- Type
The type of the controller.
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.
Methods
CreateController(HttpRequestMessage)
Creates a controller instance for the given HttpRequestMessage.
public virtual IHttpController CreateController(HttpRequestMessage request)
Parameters
requestHttpRequestMessageThe request message.
Returns
- IHttpController
The created controller instance.
GetCustomAttributes<T>()
Retrieves a collection of custom attributes of the controller.
public virtual Collection<T> GetCustomAttributes<T>() where T : class
Returns
- Collection<T>
A collection of custom attributes.
Type Parameters
TThe type of the object.
GetCustomAttributes<T>(bool)
Returns a collection of attributes that can be assigned to <typeparamref name="T" /> for this descriptor's controller.
public virtual Collection<T> GetCustomAttributes<T>(bool inherit) where T : class
Parameters
inheritbooltrue to search this controller's inheritance chain to find the attributes; otherwise, false.
Returns
- Collection<T>
A collection of attributes associated with this controller.
Type Parameters
TUsed to filter the collection of attributes. Use a value of object to retrieve all attributes.
GetFilters()
Returns a collection of filters associated with the controller.
public virtual Collection<IFilter> GetFilters()
Returns
- Collection<IFilter>
A collection of filters associated with the controller.