C# 클래스 MvcApi.RequestContextExtensions

Extension methods that facilitate support for content negotiation and HTTP method overload. The results for GetHttpMethod() GetRequestFormat() and GetResponseFormats() are cached on the RouteData dictionary.
파일 보기 프로젝트 열기: dax70/MvcApi

공개 메소드들

메소드 설명
GetHttpMethod ( this requestContext ) : string

Returns the HTTP method of the request, honoring override via the "X-Http-Method-Override" HTTP header or a form variable with the same name.

GetRequestFormat ( this requestContext ) : ContentType

Returns the format of a given request.

GetResponseFormats ( this requestContext ) : List

Returns a collection of formats that should be used to render a response to a given request, sorted in priority order.

IsBrowserRequest ( this requestContext ) : bool

Determines whether the specified HTTP request was sent by a Browser.

QueryString ( this requestContext ) : NameValueCollection

비공개 메소드들

메소드 설명
GetAndCacheObject ( System.Web.Routing.RequestContext requestContext, string key, object>.Func getter ) : object

메소드 상세

GetHttpMethod() 공개 정적인 메소드

Returns the HTTP method of the request, honoring override via the "X-Http-Method-Override" HTTP header or a form variable with the same name.
public static GetHttpMethod ( this requestContext ) : string
requestContext this
리턴 string

GetRequestFormat() 공개 정적인 메소드

Returns the format of a given request.
If the format is unrecognized or not supported.
public static GetRequestFormat ( this requestContext ) : ContentType
requestContext this
리턴 System.Net.Mime.ContentType

GetResponseFormats() 공개 정적인 메소드

Returns a collection of formats that should be used to render a response to a given request, sorted in priority order.
public static GetResponseFormats ( this requestContext ) : List
requestContext this
리턴 List

IsBrowserRequest() 공개 정적인 메소드

Determines whether the specified HTTP request was sent by a Browser.
public static IsBrowserRequest ( this requestContext ) : bool
requestContext this
리턴 bool

QueryString() 공개 정적인 메소드

public static QueryString ( this requestContext ) : NameValueCollection
requestContext this
리턴 System.Collections.Specialized.NameValueCollection