C# Класс ServiceStack.UrlExtensions

Donated by Ivan Korneliuk from his post: http://korneliuk.blogspot.com/2012/08/servicestack-reusing-dtos.html Modified to only allow using routes matching the supplied HTTP Verb
Показать файл Открыть проект

Открытые методы

Метод Описание
AsHttps ( this absoluteUrl ) : string
ExpandGenericTypeName ( Type type ) : string
ExpandTypeName ( this type ) : string
GetMetadataPropertyType ( this type ) : string
GetOperationName ( this type ) : string
GetQueryPropertyTypes ( this requestType ) : Type>.Dictionary
HasRequestBody ( this httpMethod ) : bool
ToDeleteUrl ( this requestDto ) : string
ToGetUrl ( this requestDto ) : string
ToOneWayUrl ( this requestDto, string format = "json" ) : string
ToOneWayUrlOnly ( this requestDto, string format = "json" ) : string
ToPostUrl ( this requestDto ) : string
ToPutUrl ( this requestDto ) : string
ToRelativeUri ( this requestDto, string httpMethod, string formatFallbackToPredefinedRoute = null ) : string
ToReplyUrl ( this requestDto, string format = "json" ) : string
ToReplyUrlOnly ( this requestDto, string format = "json" ) : string
ToUrl ( this requestDto, string httpMethod, string formatFallbackToPredefinedRoute = null ) : string

Generate a url from a Request DTO. Pretty URL generation require Routes to be defined using `[Route]` on the Request DTO

Приватные методы

Метод Описание
FindMostSpecificRoute ( IEnumerable routes ) : RouteResolutionResult
GetRoutesForType ( Type requestType ) : List

Описание методов

AsHttps() публичный статический Метод

public static AsHttps ( this absoluteUrl ) : string
absoluteUrl this
Результат string

ExpandGenericTypeName() публичный статический Метод

public static ExpandGenericTypeName ( Type type ) : string
type System.Type
Результат string

ExpandTypeName() публичный статический Метод

public static ExpandTypeName ( this type ) : string
type this
Результат string

GetMetadataPropertyType() публичный статический Метод

public static GetMetadataPropertyType ( this type ) : string
type this
Результат string

GetOperationName() публичный статический Метод

public static GetOperationName ( this type ) : string
type this
Результат string

GetQueryPropertyTypes() публичный статический Метод

public static GetQueryPropertyTypes ( this requestType ) : Type>.Dictionary
requestType this
Результат Type>.Dictionary

HasRequestBody() публичный статический Метод

public static HasRequestBody ( this httpMethod ) : bool
httpMethod this
Результат bool

ToDeleteUrl() публичный статический Метод

public static ToDeleteUrl ( this requestDto ) : string
requestDto this
Результат string

ToGetUrl() публичный статический Метод

public static ToGetUrl ( this requestDto ) : string
requestDto this
Результат string

ToOneWayUrl() публичный статический Метод

public static ToOneWayUrl ( this requestDto, string format = "json" ) : string
requestDto this
format string
Результат string

ToOneWayUrlOnly() публичный статический Метод

public static ToOneWayUrlOnly ( this requestDto, string format = "json" ) : string
requestDto this
format string
Результат string

ToPostUrl() публичный статический Метод

public static ToPostUrl ( this requestDto ) : string
requestDto this
Результат string

ToPutUrl() публичный статический Метод

public static ToPutUrl ( this requestDto ) : string
requestDto this
Результат string

ToRelativeUri() публичный статический Метод

public static ToRelativeUri ( this requestDto, string httpMethod, string formatFallbackToPredefinedRoute = null ) : string
requestDto this
httpMethod string
formatFallbackToPredefinedRoute string
Результат string

ToReplyUrl() публичный статический Метод

public static ToReplyUrl ( this requestDto, string format = "json" ) : string
requestDto this
format string
Результат string

ToReplyUrlOnly() публичный статический Метод

public static ToReplyUrlOnly ( this requestDto, string format = "json" ) : string
requestDto this
format string
Результат string

ToUrl() публичный статический Метод

Generate a url from a Request DTO. Pretty URL generation require Routes to be defined using `[Route]` on the Request DTO
public static ToUrl ( this requestDto, string httpMethod, string formatFallbackToPredefinedRoute = null ) : string
requestDto this
httpMethod string
formatFallbackToPredefinedRoute string
Результат string