共用方式為


EndpointRouteBuilderExtensions.MapGet 方法

定義

多載

MapGet(IEndpointRouteBuilder, String, Delegate)

RouteEndpoint將 加入至 IEndpointRouteBuilder ,其符合指定模式的 HTTP GET 要求。

MapGet(IEndpointRouteBuilder, String, RequestDelegate)

RouteEndpoint將 加入至 IEndpointRouteBuilder ,其符合指定模式的 HTTP GET 要求。

MapGet(IEndpointRouteBuilder, String, Delegate)

來源:
EndpointRouteBuilderExtensions.cs

RouteEndpoint將 加入至 IEndpointRouteBuilder ,其符合指定模式的 HTTP GET 要求。

public static Microsoft.AspNetCore.Builder.RouteHandlerBuilder MapGet (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Delegate handler);
static member MapGet : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * Delegate -> Microsoft.AspNetCore.Builder.RouteHandlerBuilder
<Extension()>
Public Function MapGet (endpoints As IEndpointRouteBuilder, pattern As String, handler As Delegate) As RouteHandlerBuilder

參數

endpoints
IEndpointRouteBuilder

IEndpointRouteBuilder要加入路由的 。

pattern
String

路由模式。

handler
Delegate

比對端點時所執行的委派。

傳回

RouteHandlerBuilder,可用來進一步自訂端點。

適用於

MapGet(IEndpointRouteBuilder, String, RequestDelegate)

來源:
EndpointRouteBuilderExtensions.cs

RouteEndpoint將 加入至 IEndpointRouteBuilder ,其符合指定模式的 HTTP GET 要求。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IEndpointConventionBuilder ^ MapGet(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ pattern, Microsoft::AspNetCore::Http::RequestDelegate ^ requestDelegate);
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapGet (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, Microsoft.AspNetCore.Http.RequestDelegate requestDelegate);
static member MapGet : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * Microsoft.AspNetCore.Http.RequestDelegate -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function MapGet (endpoints As IEndpointRouteBuilder, pattern As String, requestDelegate As RequestDelegate) As IEndpointConventionBuilder

參數

endpoints
IEndpointRouteBuilder

IEndpointRouteBuilder要加入路由的 。

pattern
String

路由模式。

requestDelegate
RequestDelegate

比對端點時所執行的委派。

傳回

IEndpointConventionBuilder,可用來進一步自訂端點。

適用於