C# 클래스 NServiceMVC.Formats.FormatManager

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

공개 메소드들

메소드 설명
CreateHttpResponse ( string contentType, object model ) : System.Web.Mvc.ActionResult

Creates an ActionResult for the model using the specified contenttype. May return an internal server error if there is a problem encoding, and may return HTTP not acceptable if the content type is unknown.

FormatManager ( NServiceMVC config ) : System
GetContentTypeFromAlias ( string alias ) : string

Attempts to translate a mime-type or shortcut for a mime-type into a real mime-type we can use. Returns the original input if not matched.

TryDeserializeModel ( string input, Type modelType, object &model ) : bool

비공개 메소드들

메소드 설명
CreateContentResult ( string contentType, object model ) : System.Web.Mvc.ContentResult

Tries to create a content result for the model using the specified contenttype. Returns null if it's not possible to create using the specified type. Normally, you should use CreateHttpResponse.

메소드 상세

CreateHttpResponse() 공개 메소드

Creates an ActionResult for the model using the specified contenttype. May return an internal server error if there is a problem encoding, and may return HTTP not acceptable if the content type is unknown.
public CreateHttpResponse ( string contentType, object model ) : System.Web.Mvc.ActionResult
contentType string
model object
리턴 System.Web.Mvc.ActionResult

FormatManager() 공개 메소드

public FormatManager ( NServiceMVC config ) : System
config NServiceMVC
리턴 System

GetContentTypeFromAlias() 공개 정적인 메소드

Attempts to translate a mime-type or shortcut for a mime-type into a real mime-type we can use. Returns the original input if not matched.
public static GetContentTypeFromAlias ( string alias ) : string
alias string
리턴 string

TryDeserializeModel() 공개 메소드

public TryDeserializeModel ( string input, Type modelType, object &model ) : bool
input string
modelType System.Type
model object
리턴 bool