C# 클래스 Decision.Common.NegotiatedResultExtensions

Extends Controller with Negotiated() ActionResult that does basic content negotiation based on the Accept header.
파일 보기 프로젝트 열기: rabbal/Decision

공개 메소드들

메소드 설명
Negotiated ( this controller, object data ) : NegotiatedResult

Return content-negotiated content of the data based on Accept header. Supports: application/json - using JSON.NET text/xml - Xml as XmlSerializer XML text/html - as text, or an optional View text/plain - as text

Negotiated ( this controller, string viewName, object data ) : NegotiatedResult

Return content-negotiated content of the data based on Accept header. Supports: application/json - using JSON.NET text/xml - Xml as XmlSerializer XML text/html - as text, or an optional View text/plain - as text

메소드 상세

Negotiated() 공개 정적인 메소드

Return content-negotiated content of the data based on Accept header. Supports: application/json - using JSON.NET text/xml - Xml as XmlSerializer XML text/html - as text, or an optional View text/plain - as text
public static Negotiated ( this controller, object data ) : NegotiatedResult
controller this
data object Data to return
리턴 NegotiatedResult

Negotiated() 공개 정적인 메소드

Return content-negotiated content of the data based on Accept header. Supports: application/json - using JSON.NET text/xml - Xml as XmlSerializer XML text/html - as text, or an optional View text/plain - as text
public static Negotiated ( this controller, string viewName, object data ) : NegotiatedResult
controller this
viewName string Name of the View to when Accept is text/html
data object Data to return
리턴 NegotiatedResult