C# Класс Decision.Common.NegotiatedResultExtensions

Extends Controller with Negotiated() ActionResult that does basic content negotiation based on the Accept header.
Показать файл Открыть проект

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

Метод Описание
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