Class HttpConfiguration
Configuration of HttpServer instances.
public class HttpConfiguration : IDisposable
- Inheritance
-
HttpConfiguration
- Implements
- Inherited Members
Constructors
HttpConfiguration()
Initializes a new instance of the HttpConfiguration class.
public HttpConfiguration()
HttpConfiguration(HttpRouteCollection)
Initializes a new instance of the HttpConfiguration class with an HTTP route collection.
public HttpConfiguration(HttpRouteCollection routes)
Parameters
routes
HttpRouteCollectionThe HTTP route collection to associate with this instance.
Properties
DependencyResolver
Gets or sets the dependency resolver associated with thisinstance.
public IDependencyResolver DependencyResolver { get; set; }
Property Value
- IDependencyResolver
The dependency resolver.
Filters
Gets the list of filters that apply to all requests served using this HttpConfiguration instance.
public HttpFilterCollection Filters { get; }
Property Value
- HttpFilterCollection
The list of filters.
Formatters
Gets the media-type formatters for this instance.
public MediaTypeFormatterCollection Formatters { get; }
Property Value
- MediaTypeFormatterCollection
A collection of System.Net.Http.Formatting.MediaTypeFormatter objects.
IncludeErrorDetailPolicy
Gets or sets a value indicating whether error details should be included in error messages.
public IncludeErrorDetailPolicy IncludeErrorDetailPolicy { get; set; }
Property Value
- IncludeErrorDetailPolicy
The IncludeErrorDetailPolicy value that indicates that error detail policy.
Initializer
Gets or sets the action that will perform final initialization of the HttpConfiguration instance before it is used to process requests.
public Action<HttpConfiguration> Initializer { get; set; }
Property Value
- Action<HttpConfiguration>
The action that will perform final initialization of the HttpConfiguration instance.
MessageHandlers
Gets an ordered list of DelegatingHandler instances to be invoked as an HttpRequestMessage travels up the stack and an HttpResponseMessage travels down in stack in return.
public Collection<DelegatingHandler> MessageHandlers { get; }
Property Value
- Collection<DelegatingHandler>
The message handler collection.
ParameterBindingRules
The collection of rules for how parameters should be bound.
public ParameterBindingRulesCollection ParameterBindingRules { get; }
Property Value
- ParameterBindingRulesCollection
A collection of functions that can produce a parameter binding for a given parameter.
Properties
Gets the properties associated with this instance.
public ConcurrentDictionary<object, object> Properties { get; }
Property Value
- ConcurrentDictionary<object, object>
The ConcurrentDictionary<TKey, TValue>that contains the properties.
Routes
Gets the HttpRouteCollection associated with this HttpConfiguration instance.
public HttpRouteCollection Routes { get; }
Property Value
Services
Gets the container of default services associated with this instance.
public ServicesContainer Services { get; }
Property Value
- ServicesContainer
The ServicesContainer that contains the default services for this instance.
VirtualPathRoot
Gets the root virtual path.
public string VirtualPathRoot { get; }
Property Value
- string
The root virtual path.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases the unmanaged resources that are used by the object and, optionally, releases the managed resources.
protected virtual void Dispose(bool disposing)
Parameters
disposing
booltrue to release both managed and unmanaged resources; false to release only unmanaged resources.