Class ApiExplorer
- Namespace
- System.Web.Http.Description
- Assembly
- System.Web.Http.dll
Explores the URI space of the service based on routes, controllers and actions available in the system.
public class ApiExplorer : IApiExplorer
- Inheritance
-
ApiExplorer
- Implements
- Inherited Members
Constructors
ApiExplorer(HttpConfiguration)
Initializes a new instance of the ApiExplorer class.
public ApiExplorer(HttpConfiguration configuration)
Parameters
configurationHttpConfigurationThe configuration.
Properties
ApiDescriptions
Gets the API descriptions. The descriptions are initialized on the first access.
public Collection<ApiDescription> ApiDescriptions { get; }
Property Value
DocumentationProvider
Gets or sets the documentation provider. The provider will be responsible for documenting the API.
public IDocumentationProvider DocumentationProvider { get; set; }
Property Value
- IDocumentationProvider
The documentation provider.
Methods
GetHttpMethodsSupportedByAction(IHttpRoute, HttpActionDescriptor)
Gets a collection of HttpMethods supported by the action. Called when initializing the ApiDescriptions.
public virtual Collection<HttpMethod> GetHttpMethodsSupportedByAction(IHttpRoute route, HttpActionDescriptor actionDescriptor)
Parameters
routeIHttpRouteThe route.
actionDescriptorHttpActionDescriptorThe action descriptor.
Returns
- Collection<HttpMethod>
A collection of HttpMethods supported by the action.
ShouldExploreAction(string, HttpActionDescriptor, IHttpRoute)
Determines whether the action should be considered for ApiDescriptions generation. Called when initializing the ApiDescriptions.
public virtual bool ShouldExploreAction(string actionVariableValue, HttpActionDescriptor actionDescriptor, IHttpRoute route)
Parameters
actionVariableValuestringThe action variable value from the route.
actionDescriptorHttpActionDescriptorThe action descriptor.
routeIHttpRouteThe route.
Returns
- bool
true if the action should be considered for ApiDescriptions generation, false otherwise.
ShouldExploreController(string, HttpControllerDescriptor, IHttpRoute)
Determines whether the controller should be considered for ApiDescriptions generation. Called when initializing the ApiDescriptions.
public virtual bool ShouldExploreController(string controllerVariableValue, HttpControllerDescriptor controllerDescriptor, IHttpRoute route)
Parameters
controllerVariableValuestringThe controller variable value from the route.
controllerDescriptorHttpControllerDescriptorThe controller descriptor.
routeIHttpRouteThe route.
Returns
- bool
true if the controller should be considered for ApiDescriptions generation, false otherwise.