C# Class 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
Afficher le fichier Open project: ServiceStack/ServiceStack

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
FindMostSpecificRoute ( IEnumerable routes ) : RouteResolutionResult
GetRoutesForType ( Type requestType ) : List

Method Details

AsHttps() public static méthode

public static AsHttps ( this absoluteUrl ) : string
absoluteUrl this
Résultat string

ExpandGenericTypeName() public static méthode

public static ExpandGenericTypeName ( Type type ) : string
type System.Type
Résultat string

ExpandTypeName() public static méthode

public static ExpandTypeName ( this type ) : string
type this
Résultat string

GetMetadataPropertyType() public static méthode

public static GetMetadataPropertyType ( this type ) : string
type this
Résultat string

GetOperationName() public static méthode

public static GetOperationName ( this type ) : string
type this
Résultat string

GetQueryPropertyTypes() public static méthode

public static GetQueryPropertyTypes ( this requestType ) : Type>.Dictionary
requestType this
Résultat Type>.Dictionary

HasRequestBody() public static méthode

public static HasRequestBody ( this httpMethod ) : bool
httpMethod this
Résultat bool

ToDeleteUrl() public static méthode

public static ToDeleteUrl ( this requestDto ) : string
requestDto this
Résultat string

ToGetUrl() public static méthode

public static ToGetUrl ( this requestDto ) : string
requestDto this
Résultat string

ToOneWayUrl() public static méthode

public static ToOneWayUrl ( this requestDto, string format = "json" ) : string
requestDto this
format string
Résultat string

ToOneWayUrlOnly() public static méthode

public static ToOneWayUrlOnly ( this requestDto, string format = "json" ) : string
requestDto this
format string
Résultat string

ToPostUrl() public static méthode

public static ToPostUrl ( this requestDto ) : string
requestDto this
Résultat string

ToPutUrl() public static méthode

public static ToPutUrl ( this requestDto ) : string
requestDto this
Résultat string

ToRelativeUri() public static méthode

public static ToRelativeUri ( this requestDto, string httpMethod, string formatFallbackToPredefinedRoute = null ) : string
requestDto this
httpMethod string
formatFallbackToPredefinedRoute string
Résultat string

ToReplyUrl() public static méthode

public static ToReplyUrl ( this requestDto, string format = "json" ) : string
requestDto this
format string
Résultat string

ToReplyUrlOnly() public static méthode

public static ToReplyUrlOnly ( this requestDto, string format = "json" ) : string
requestDto this
format string
Résultat string

ToUrl() public static méthode

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
Résultat string