C# Class NServiceMVC.ServiceException

An exception that causes the REST service to return a specific http status code and
Inheritance: System.Exception, IServiceException
Afficher le fichier Open project: gregmac/NServiceMVC

Méthodes publiques

Méthode Description
ServiceException ( System statusCode, object model ) : System

Return a specific HTTP status code with the specified model as the content. The model will be serialized according to the accept-types, just like a normal service response.

ServiceException ( object model ) : System

Throw a 500 - Internal Server Error, with the specified model as the content. The model will be serialized according to the accept-types, just like a normal service response.

Method Details

ServiceException() public méthode

Return a specific HTTP status code with the specified model as the content. The model will be serialized according to the accept-types, just like a normal service response.
public ServiceException ( System statusCode, object model ) : System
statusCode System
model object
Résultat System

ServiceException() public méthode

Throw a 500 - Internal Server Error, with the specified model as the content. The model will be serialized according to the accept-types, just like a normal service response.
public ServiceException ( object model ) : System
model object
Résultat System