C# 클래스 ServiceStack.HttpRequestExtensions

파일 보기 프로젝트 열기: ServiceStack/ServiceStack 1 사용 예제들

공개 메소드들

메소드 설명
CookiesAsDictionary ( this httpReq ) : string>.Dictionary
DidReturn304NotModified ( this httpReq, System.DateTime dateTime, IResponse httpRes ) : bool
GetAbsolutePath ( this httpReq ) : string
GetAbsoluteUrl ( this httpReq, string url ) : string
GetApplicationUrl ( this httpReq ) : string
GetAttributes ( IPAddress ipAddress ) : ServiceStack.Host.RequestAttributes
GetAttributes ( this request ) : ServiceStack.Host.RequestAttributes
GetBaseUrl ( this request ) : string
GetDirectoryPath ( this request ) : string
GetFlattenedRequestParams ( this request ) : string>.Dictionary

Duplicate params have their values joined together in a comma-delimited string

GetFormatModifier ( this httpReq ) : string
GetHttpMethodOverride ( this httpReq ) : string
GetItemOrCookie ( this httpReq, string name ) : string

Gets string value from Items[name] then Cookies[name] if exists. Useful when *first* setting the users response cookie in the request filter. To access the value for this initial request you need to set it in Items[].

GetJsonpCallback ( this httpReq ) : string
GetLastPathInfo ( this request ) : string
GetLeftAuthority ( this uri ) : string
GetOperationName ( this request ) : string
GetOperationNameFromLastPathInfo ( string lastPathInfo ) : string
GetOperationType ( this req ) : Type
GetParam ( this httpReq, string name ) : string

Gets request paramater string value by looking in the following order: - QueryString[name] - FormData[name] - Cookies[name] - Items[name]

GetParentAbsolutePath ( this httpReq ) : string
GetParentBaseUrl ( this request ) : string
GetParentPathUrl ( this httpReq ) : string
GetPathAndQuery ( this request ) : string
GetPathInfo ( string fullPath, string mode, string appPath ) : string
GetPathInfo ( this request ) : string
GetPathUrl ( this httpReq ) : string
GetPhysicalPath ( this httpReq ) : string
GetQueryStringContentType ( this httpReq ) : string
GetRequestParams ( this request ) : string>.Dictionary

Duplicate Params are given a unique key by appending a #1 suffix

GetResponseContentType ( this httpReq ) : string
GetRoute ( this req ) : RestPath
GetSoapMessage ( this httpReq ) : System.ServiceModel.Channels.Message
GetTemplate ( this httpReq ) : string
GetUrlHostName ( this httpReq ) : string
GetView ( this httpReq ) : string
GetVirtualDirectory ( this httpReq ) : IVirtualDirectory
GetVirtualFile ( this httpReq ) : IVirtualFile
GetVirtualNode ( this httpReq ) : IVirtualNode
HasAnyOfContentTypes ( this request ) : bool
HasNotModifiedSince ( this httpReq, System.DateTime dateTime ) : bool
InferBaseUrl ( this absoluteUri, string fromPathInfo = null ) : string
IsContentType ( this request, string contentType ) : bool
IsInLocalSubnet ( this ipAddress ) : bool
IsMultiRequest ( this req ) : bool
NormalizeScheme ( this url, bool useHttps ) : string
ResolveAbsoluteUrl ( this httpReq, string url ) : string
ResolveItem ( this httpReq, string itemKey, object>.Func resolveFn ) : object

Use this to treat Request.Items[] as a cache by returning pre-computed items to save calculating them multiple times.

ResolvePathInfoFromMappedPath ( string fullPath, string mappedPathRoot ) : string
SanitizedVirtualPath ( this virtualPath ) : string
SetAutoBatchCompletedHeader ( this req, int completed ) : void
SetOperationName ( this httpReq, string operationName ) : void
SetRoute ( this req, RestPath route ) : void
SetTemplate ( this httpReq, string templateName ) : void
SetView ( this httpReq, string viewName ) : void
ToErrorCode ( this ex ) : string
ToHttpContextBase ( this aspnetHttpReq ) : System.Web.HttpContextBase
ToRequest ( this httpCtx, string operationName = null ) : IHttpRequest
ToRequestAttributes ( string attrNames ) : ServiceStack.Host.RequestAttributes
ToResponse ( this httpCtx ) : IHttpResponse
ToStatusCode ( this ex ) : int
ToWebServiceException ( this error ) : ServiceStack.WebServiceException
UseHttps ( this httpReq ) : bool

비공개 메소드들

메소드 설명
GetLastPathInfoFromRawUrl ( string rawUrl ) : string
HttpRequestExtensions ( ) : System

메소드 상세

CookiesAsDictionary() 공개 정적인 메소드

public static CookiesAsDictionary ( this httpReq ) : string>.Dictionary
httpReq this
리턴 string>.Dictionary

DidReturn304NotModified() 공개 정적인 메소드

public static DidReturn304NotModified ( this httpReq, System.DateTime dateTime, IResponse httpRes ) : bool
httpReq this
dateTime System.DateTime
httpRes IResponse
리턴 bool

GetAbsolutePath() 공개 정적인 메소드

public static GetAbsolutePath ( this httpReq ) : string
httpReq this
리턴 string

GetAbsoluteUrl() 공개 정적인 메소드

public static GetAbsoluteUrl ( this httpReq, string url ) : string
httpReq this
url string
리턴 string

GetApplicationUrl() 공개 정적인 메소드

public static GetApplicationUrl ( this httpReq ) : string
httpReq this
리턴 string

GetAttributes() 공개 정적인 메소드

public static GetAttributes ( IPAddress ipAddress ) : ServiceStack.Host.RequestAttributes
ipAddress System.Net.IPAddress
리턴 ServiceStack.Host.RequestAttributes

GetAttributes() 공개 정적인 메소드

public static GetAttributes ( this request ) : ServiceStack.Host.RequestAttributes
request this
리턴 ServiceStack.Host.RequestAttributes

GetBaseUrl() 공개 정적인 메소드

public static GetBaseUrl ( this request ) : string
request this
리턴 string

GetDirectoryPath() 공개 정적인 메소드

public static GetDirectoryPath ( this request ) : string
request this
리턴 string

GetFlattenedRequestParams() 공개 정적인 메소드

Duplicate params have their values joined together in a comma-delimited string
public static GetFlattenedRequestParams ( this request ) : string>.Dictionary
request this
리턴 string>.Dictionary

GetFormatModifier() 공개 정적인 메소드

public static GetFormatModifier ( this httpReq ) : string
httpReq this
리턴 string

GetHttpMethodOverride() 공개 정적인 메소드

public static GetHttpMethodOverride ( this httpReq ) : string
httpReq this
리턴 string

GetItemOrCookie() 공개 정적인 메소드

Gets string value from Items[name] then Cookies[name] if exists. Useful when *first* setting the users response cookie in the request filter. To access the value for this initial request you need to set it in Items[].
public static GetItemOrCookie ( this httpReq, string name ) : string
httpReq this
name string
리턴 string

GetJsonpCallback() 공개 정적인 메소드

public static GetJsonpCallback ( this httpReq ) : string
httpReq this
리턴 string

GetLastPathInfo() 공개 정적인 메소드

public static GetLastPathInfo ( this request ) : string
request this
리턴 string

GetLeftAuthority() 공개 정적인 메소드

public static GetLeftAuthority ( this uri ) : string
uri this
리턴 string

GetOperationName() 공개 정적인 메소드

public static GetOperationName ( this request ) : string
request this
리턴 string

GetOperationNameFromLastPathInfo() 공개 정적인 메소드

public static GetOperationNameFromLastPathInfo ( string lastPathInfo ) : string
lastPathInfo string
리턴 string

GetOperationType() 공개 정적인 메소드

public static GetOperationType ( this req ) : Type
req this
리턴 System.Type

GetParam() 공개 정적인 메소드

Gets request paramater string value by looking in the following order: - QueryString[name] - FormData[name] - Cookies[name] - Items[name]
public static GetParam ( this httpReq, string name ) : string
httpReq this
name string
리턴 string

GetParentAbsolutePath() 공개 정적인 메소드

public static GetParentAbsolutePath ( this httpReq ) : string
httpReq this
리턴 string

GetParentBaseUrl() 공개 정적인 메소드

public static GetParentBaseUrl ( this request ) : string
request this
리턴 string

GetParentPathUrl() 공개 정적인 메소드

public static GetParentPathUrl ( this httpReq ) : string
httpReq this
리턴 string

GetPathAndQuery() 공개 정적인 메소드

public static GetPathAndQuery ( this request ) : string
request this
리턴 string

GetPathInfo() 공개 정적인 메소드

public static GetPathInfo ( string fullPath, string mode, string appPath ) : string
fullPath string
mode string
appPath string
리턴 string

GetPathInfo() 공개 정적인 메소드

public static GetPathInfo ( this request ) : string
request this
리턴 string

GetPathUrl() 공개 정적인 메소드

public static GetPathUrl ( this httpReq ) : string
httpReq this
리턴 string

GetPhysicalPath() 공개 정적인 메소드

public static GetPhysicalPath ( this httpReq ) : string
httpReq this
리턴 string

GetQueryStringContentType() 공개 정적인 메소드

public static GetQueryStringContentType ( this httpReq ) : string
httpReq this
리턴 string

GetRequestParams() 공개 정적인 메소드

Duplicate Params are given a unique key by appending a #1 suffix
public static GetRequestParams ( this request ) : string>.Dictionary
request this
리턴 string>.Dictionary

GetResponseContentType() 공개 정적인 메소드

public static GetResponseContentType ( this httpReq ) : string
httpReq this
리턴 string

GetRoute() 공개 정적인 메소드

public static GetRoute ( this req ) : RestPath
req this
리턴 ServiceStack.Host.RestPath

GetSoapMessage() 공개 정적인 메소드

public static GetSoapMessage ( this httpReq ) : System.ServiceModel.Channels.Message
httpReq this
리턴 System.ServiceModel.Channels.Message

GetTemplate() 공개 정적인 메소드

public static GetTemplate ( this httpReq ) : string
httpReq this
리턴 string

GetUrlHostName() 공개 정적인 메소드

public static GetUrlHostName ( this httpReq ) : string
httpReq this
리턴 string

GetView() 공개 정적인 메소드

public static GetView ( this httpReq ) : string
httpReq this
리턴 string

GetVirtualDirectory() 공개 정적인 메소드

public static GetVirtualDirectory ( this httpReq ) : IVirtualDirectory
httpReq this
리턴 IVirtualDirectory

GetVirtualFile() 공개 정적인 메소드

public static GetVirtualFile ( this httpReq ) : IVirtualFile
httpReq this
리턴 IVirtualFile

GetVirtualNode() 공개 정적인 메소드

public static GetVirtualNode ( this httpReq ) : IVirtualNode
httpReq this
리턴 IVirtualNode

HasAnyOfContentTypes() 공개 정적인 메소드

public static HasAnyOfContentTypes ( this request ) : bool
request this
리턴 bool

HasNotModifiedSince() 공개 정적인 메소드

public static HasNotModifiedSince ( this httpReq, System.DateTime dateTime ) : bool
httpReq this
dateTime System.DateTime
리턴 bool

InferBaseUrl() 공개 정적인 메소드

public static InferBaseUrl ( this absoluteUri, string fromPathInfo = null ) : string
absoluteUri this
fromPathInfo string
리턴 string

IsContentType() 공개 정적인 메소드

public static IsContentType ( this request, string contentType ) : bool
request this
contentType string
리턴 bool

IsInLocalSubnet() 공개 정적인 메소드

public static IsInLocalSubnet ( this ipAddress ) : bool
ipAddress this
리턴 bool

IsMultiRequest() 공개 정적인 메소드

public static IsMultiRequest ( this req ) : bool
req this
리턴 bool

NormalizeScheme() 공개 정적인 메소드

public static NormalizeScheme ( this url, bool useHttps ) : string
url this
useHttps bool
리턴 string

ResolveAbsoluteUrl() 공개 정적인 메소드

public static ResolveAbsoluteUrl ( this httpReq, string url ) : string
httpReq this
url string
리턴 string

ResolveItem() 공개 정적인 메소드

Use this to treat Request.Items[] as a cache by returning pre-computed items to save calculating them multiple times.
public static ResolveItem ( this httpReq, string itemKey, object>.Func resolveFn ) : object
httpReq this
itemKey string
resolveFn object>.Func
리턴 object

ResolvePathInfoFromMappedPath() 공개 정적인 메소드

public static ResolvePathInfoFromMappedPath ( string fullPath, string mappedPathRoot ) : string
fullPath string
mappedPathRoot string
리턴 string

SanitizedVirtualPath() 공개 정적인 메소드

public static SanitizedVirtualPath ( this virtualPath ) : string
virtualPath this
리턴 string

SetAutoBatchCompletedHeader() 공개 정적인 메소드

public static SetAutoBatchCompletedHeader ( this req, int completed ) : void
req this
completed int
리턴 void

SetOperationName() 공개 정적인 메소드

public static SetOperationName ( this httpReq, string operationName ) : void
httpReq this
operationName string
리턴 void

SetRoute() 공개 정적인 메소드

public static SetRoute ( this req, RestPath route ) : void
req this
route ServiceStack.Host.RestPath
리턴 void

SetTemplate() 공개 정적인 메소드

public static SetTemplate ( this httpReq, string templateName ) : void
httpReq this
templateName string
리턴 void

SetView() 공개 정적인 메소드

public static SetView ( this httpReq, string viewName ) : void
httpReq this
viewName string
리턴 void

ToErrorCode() 공개 정적인 메소드

public static ToErrorCode ( this ex ) : string
ex this
리턴 string

ToHttpContextBase() 공개 정적인 메소드

public static ToHttpContextBase ( this aspnetHttpReq ) : System.Web.HttpContextBase
aspnetHttpReq this
리턴 System.Web.HttpContextBase

ToRequest() 공개 정적인 메소드

public static ToRequest ( this httpCtx, string operationName = null ) : IHttpRequest
httpCtx this
operationName string
리턴 IHttpRequest

ToRequestAttributes() 공개 정적인 메소드

public static ToRequestAttributes ( string attrNames ) : ServiceStack.Host.RequestAttributes
attrNames string
리턴 ServiceStack.Host.RequestAttributes

ToResponse() 공개 정적인 메소드

public static ToResponse ( this httpCtx ) : IHttpResponse
httpCtx this
리턴 IHttpResponse

ToStatusCode() 공개 정적인 메소드

public static ToStatusCode ( this ex ) : int
ex this
리턴 int

ToWebServiceException() 공개 정적인 메소드

public static ToWebServiceException ( this error ) : ServiceStack.WebServiceException
error this
리턴 ServiceStack.WebServiceException

UseHttps() 공개 정적인 메소드

public static UseHttps ( this httpReq ) : bool
httpReq this
리턴 bool