易简.道(ething)

爱在进行时
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

MVC-REST-SilverLight 之 MapServiceRoute

Posted on 2012-02-21 20:56  如是如是  阅读(331)  评论(0编辑  收藏  举报

 

 

RouteCollectionExtensions..::..MapServiceRoute<(Of <(<'TService>)>)> Method

RouteCollectionExtensions Class  See Also  Send Feedback

 

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Namespace:  System.Web.Routing
Assembly:  Microsoft.ApplicationServer.HttpEnhancements (in Microsoft.ApplicationServer.HttpEnhancements.dll)

Syntax

Visual Basic (Declaration)

<ExtensionAttribute> _

Public Shared Sub MapServiceRoute(Of TService) ( _

    routes As RouteCollection, _

    routePrefix As String, _

    configuration As HttpConfiguration, _

    constraints As Object, _

    useMethodPrefixForHttpMethod As Boolean _

)

 

Visual Basic (Usage)

Dim routes As RouteCollection

Dim routePrefix As String

Dim configuration As HttpConfiguration

Dim constraints As Object

Dim useMethodPrefixForHttpMethod As Boolean

 

routes.MapServiceRoute(routePrefix, _

    configuration, constraints, useMethodPrefixForHttpMethod)

 

C#

public static void MapServiceRoute<TService>(

    this RouteCollection routes,

    string routePrefix,

    HttpConfiguration configuration,

    Object constraints,

    bool useMethodPrefixForHttpMethod

)

 

Visual C++

[ExtensionAttribute]

public:

generic<typename TService>

static void MapServiceRoute(

    RouteCollection^ routes,

    String^ routePrefix,

    HttpConfiguration^ configuration,

    Object^ constraints,

    bool useMethodPrefixForHttpMethod

)

 

F#

static member MapServiceRoute :

routes:RouteCollection *

routePrefix:string *

configuration:HttpConfiguration *

constraints:Object *

useMethodPrefixForHttpMethod:bool -> unit

 

JScript

JScript does not support generic types and methods.

Type Parameters

TService

Parameters

routes

Type: System.Web.Routing..::..RouteCollection

routePrefix

Type: System..::..String

configuration

Type: Microsoft.ApplicationServer.Http..::..HttpConfiguration

constraints

Type: System..::..Object

useMethodPrefixForHttpMethod

Type: System..::..Boolean

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type RouteCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .