ApiController Class
Defines properties and methods for API controller.
Inheritance Hierarchy
System.Object
System.Web.Http.ApiController
Namespace: System.Web.Http
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public MustInherit Class ApiController _
Implements IHttpController, IDisposable
'Usage
Dim instance As ApiController
public abstract class ApiController : IHttpController,
IDisposable
public ref class ApiController abstract : IHttpController,
IDisposable
[<AbstractClassAttribute>]
type ApiController =
class
interface IHttpController
interface IDisposable
end
public abstract class ApiController implements IHttpController, IDisposable
The ApiController type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ApiController | Initializes a new instance of the ApiController class. |
Top
Properties
Name | Description | |
---|---|---|
Configuration | Gets or sets the HttpConfiguration of the current ApiController. | |
ControllerContext | Gets the HttpControllerContext of the current ApiController. | |
ModelState | Gets the model state after the model binding process. | |
Request | Gets or sets the HttpRequestMessage of the current ApiController. | |
Url | Returns an instance of a UrlHelper, which is used to generate URLs to other APIs. | |
User | Returns the current principal associated with this request. |
Top
Methods
Name | Description | |
---|---|---|
Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | |
Dispose(Boolean) | Releases the unmanaged resources that are used by the object and, optionally, releases the managed resources. | |
Equals | (Inherited from Object.) | |
ExecuteAsync | Executes asynchronously a single HTTP operation. | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
Initialize | Initializes the ApiController instance with the specified controllerContext. | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.