A collection of IHttpRoute instances.
Inheritance Hierarchy
System.Object
  System.Web.Http.HttpRouteCollection
Namespace:  System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Class HttpRouteCollection _
    Implements ICollection(Of IHttpRoute), IEnumerable(Of IHttpRoute),  _
    IEnumerable, IDisposable
'Usage
Dim instance As HttpRouteCollection
public class HttpRouteCollection : ICollection<IHttpRoute>, 
    IEnumerable<IHttpRoute>, IEnumerable, IDisposable
public ref class HttpRouteCollection : ICollection<IHttpRoute^>, 
    IEnumerable<IHttpRoute^>, IEnumerable, IDisposable
type HttpRouteCollection =  
    class
        interface ICollection<IHttpRoute>
        interface IEnumerable<IHttpRoute>
        interface IEnumerable
        interface IDisposable
    end
public class HttpRouteCollection implements ICollection<IHttpRoute>, IEnumerable<IHttpRoute>, IEnumerable, IDisposable
The HttpRouteCollection type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| .jpeg) | HttpRouteCollection() | Initializes a new instance of the HttpRouteCollection class. | 
| .jpeg) | HttpRouteCollection(String) | Initializes a new instance of the HttpRouteCollection class. | 
Top
Properties
| Name | Description | |
|---|---|---|
| .jpeg) | Count | Gets the number of items in the collection. | 
| .jpeg) | IsReadOnly | Gets a value indicating whether the collection is read-only. | 
| .jpeg) | Item[Int32] | Gets or sets the element at the specified index. | 
| .jpeg) | Item[String] | Gets or sets the element with the specified route name. | 
| .jpeg) | VirtualPathRoot | Gets the virtual path root. | 
Top
Methods
| Name | Description | |
|---|---|---|
| .jpeg) | Add | Adds an IHttpRoute instance to the collection. | 
| .jpeg) | Clear | Removes all items from the collection. | 
| .jpeg) | Contains | Determines whether the collection contains a specific IHttpRoute. | 
| .jpeg) | ContainsKey | Determines whether the collection contains an element with the specified key. | 
| .jpeg) | CopyTo(KeyValuePair<String, IHttpRoute>[], Int32) | Copies the IHttpRoute instances of the collection to an array, starting at a particular array index. | 
| .jpeg) | CopyTo(IHttpRoute[], Int32) | Copies the route names and IHttpRoute instances of the collection to an array, starting at a particular array index. | 
| .jpeg) | CreateRoute(String, Object, Object) | Creates an IHttpRoute instance. | 
| .jpeg) | CreateRoute(String, IDictionary<String, Object>, IDictionary<String, Object>, IDictionary<String, Object>) | Creates an IHttpRoute instance. | 
| .jpeg) | CreateRoute(String, IDictionary<String, Object>, IDictionary<String, Object>, IDictionary<String, Object>, HttpMessageHandler) | Creates an IHttpRoute instance. | 
| .jpeg) | Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | 
| .jpeg) | Dispose(Boolean) | Releases the unmanaged resources that are used by the object and, optionally, releases the managed resources. | 
| .jpeg) | Equals | (Inherited from Object.) | 
| .jpeg) | Finalize | (Inherited from Object.) | 
| .jpeg) | GetEnumerator | Returns an enumerator that iterates through the collection. | 
| .jpeg) | GetHashCode | (Inherited from Object.) | 
| .jpeg) | GetRouteData | Gets the route data for a specified HTTP request. | 
| .jpeg) | GetType | (Inherited from Object.) | 
| .jpeg) | GetVirtualPath | Gets a virtual path. | 
| .jpeg) | Insert | Inserts an IHttpRoute instance into the collection. | 
| .jpeg) | MemberwiseClone | (Inherited from Object.) | 
| .jpeg) | OnGetEnumerator | Called internally to get the enumerator for the collection. | 
| .jpeg) | Remove | Removes an IHttpRoute instance from the collection. | 
| .jpeg) | ToString | (Inherited from Object.) | 
| .jpeg) | TryGetValue | Gets the IHttpRoute with the specified route name. | 
Top
Extension Methods
| Name | Description | |
|---|---|---|
| .gif) | MapHttpRoute(String, String) | Overloaded. Maps the specified route template. (Defined by HttpRouteCollectionExtensions.) | 
| .gif) | MapHttpRoute(String, String, Object) | Overloaded. Maps the specified route template and sets default route values. (Defined by HttpRouteCollectionExtensions.) | 
| .gif) | MapHttpRoute(String, String, Object, Object) | Overloaded. Maps the specified route template and sets default route values and constraints. (Defined by HttpRouteCollectionExtensions.) | 
| .gif) | MapHttpRoute(String, String, Object, Object, HttpMessageHandler) | Overloaded. Maps the specified route template and sets default route values, constraints, and end-point message handler. (Defined by HttpRouteCollectionExtensions.) | 
Top
Explicit Interface Implementations
| Name | Description | |
|---|---|---|
| .jpeg) .jpeg) | ICollection<IHttpRoute>.Add | Adds an item to the collection. | 
| .jpeg) .jpeg) | IEnumerable.GetEnumerator | Returns an enumerator that iterates through the collection. | 
| .jpeg) .jpeg) | ICollection<IHttpRoute>.Remove | Removes the first occurrence of a specific object from the collection. | 
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.