Export (0) Print
Expand All

HttpRouteCollection Class

A collection of IHttpRoute instances.

System.Object
  System.Web.Http.HttpRouteCollection

Namespace:  System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

public class HttpRouteCollection : ICollection<IHttpRoute>, 
	IEnumerable<IHttpRoute>, IEnumerable, IDisposable

The HttpRouteCollection type exposes the following members.

  NameDescription
Public methodHttpRouteCollection()Initializes a new instance of the HttpRouteCollection class.
Public methodHttpRouteCollection(String)Initializes a new instance of the HttpRouteCollection class.
Top

  NameDescription
Public propertyCountGets the number of items in the collection.
Public propertyIsReadOnlyGets a value indicating whether the collection is read-only.
Public propertyItem[Int32]Gets or sets the element at the specified index.
Public propertyItem[String]Gets or sets the element with the specified route name.
Public propertyVirtualPathRootGets the virtual path root.
Top

  NameDescription
Public methodAddAdds an IHttpRoute instance to the collection.
Public methodClearRemoves all items from the collection.
Public methodContainsDetermines whether the collection contains a specific IHttpRoute.
Public methodContainsKeyDetermines whether the collection contains an element with the specified key.
Public methodCopyTo(KeyValuePair<String, IHttpRoute>[], Int32)Copies the IHttpRoute instances of the collection to an array, starting at a particular array index.
Public methodCopyTo(IHttpRoute[], Int32)Copies the route names and IHttpRoute instances of the collection to an array, starting at a particular array index.
Public methodCreateRoute(String, Object, Object)Creates an IHttpRoute instance.
Public methodCreateRoute(String, IDictionary<String, Object>, IDictionary<String, Object>, IDictionary<String, Object>)Creates an IHttpRoute instance.
Public methodCreateRoute(String, IDictionary<String, Object>, IDictionary<String, Object>, IDictionary<String, Object>, HttpMessageHandler)Creates an IHttpRoute instance.
Public methodDispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Protected methodDispose(Boolean)Releases the unmanaged resources that are used by the object and, optionally, releases the managed resources.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator that iterates through the collection.
Public methodGetHashCode (Inherited from Object.)
Public methodGetRouteDataGets the route data for a specified HTTP request.
Public methodGetType (Inherited from Object.)
Public methodGetVirtualPathGets a virtual path.
Public methodInsertInserts an IHttpRoute instance into the collection.
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodOnGetEnumeratorCalled internally to get the enumerator for the collection.
Public methodRemoveRemoves an IHttpRoute instance from the collection.
Public methodToString (Inherited from Object.)
Public methodTryGetValueGets the IHttpRoute with the specified route name.
Top

  NameDescription
Public Extension MethodMapHttpRoute(String, String)Overloaded. Maps the specified route template. (Defined by HttpRouteCollectionExtensions.)
Public Extension MethodMapHttpRoute(String, String, Object)Overloaded. Maps the specified route template and sets default route values. (Defined by HttpRouteCollectionExtensions.)
Public Extension MethodMapHttpRoute(String, String, Object, Object)Overloaded. Maps the specified route template and sets default route values and constraints. (Defined by HttpRouteCollectionExtensions.)
Public Extension MethodMapHttpRoute(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

  NameDescription
Explicit interface implemetationPrivate methodICollection<IHttpRoute>.AddAdds an item to the collection.
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an enumerator that iterates through the collection.
Explicit interface implemetationPrivate methodICollection<IHttpRoute>.RemoveRemoves the first occurrence of a specific object from the collection.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft