C# Class ServiceStack.WebHost.Endpoints.Extensions.HttpResponseExtensions

显示文件 Open project: firstsee/ServiceStack

Public Methods

Method Description
WriteErrorToResponse ( this response, EndpointAttributes contentType, string operationName, string errorMessage, Exception ex ) : void
WriteErrorToResponse ( this response, string contentType, string operationName, string errorMessage, Exception ex ) : void
WriteTextToResponse ( this response, string text, string defaultContentType ) : void
WriteToOutputStream ( Stream responseStream, object result ) : bool
WriteToResponse ( this response, object result, StreamSerializerDelegate defaultAction, string defaultContentType ) : bool

Writes to response. Response headers are customizable by implementing IHasOptions an returning Dictionary of Http headers.

WriteToResponse ( this response, object result, string defaultContentType ) : bool

Writes to response.

Private Methods

Method Description
WriteJsonErrorToResponse ( this response, string operationName, string errorMessage, Exception ex ) : void
WriteJsvErrorToResponse ( this response, string operationName, string errorMessage, Exception ex ) : void
WriteXmlErrorToResponse ( this response, string operationName, string errorMessage, Exception ex ) : void

Method Details

WriteErrorToResponse() public static method

public static WriteErrorToResponse ( this response, EndpointAttributes contentType, string operationName, string errorMessage, Exception ex ) : void
response this
contentType EndpointAttributes
operationName string
errorMessage string
ex System.Exception
return void

WriteErrorToResponse() public static method

public static WriteErrorToResponse ( this response, string contentType, string operationName, string errorMessage, Exception ex ) : void
response this
contentType string
operationName string
errorMessage string
ex System.Exception
return void

WriteTextToResponse() public static method

public static WriteTextToResponse ( this response, string text, string defaultContentType ) : void
response this
text string
defaultContentType string
return void

WriteToOutputStream() public static method

public static WriteToOutputStream ( Stream responseStream, object result ) : bool
responseStream Stream
result object
return bool

WriteToResponse() public static method

Writes to response. Response headers are customizable by implementing IHasOptions an returning Dictionary of Http headers.
public static WriteToResponse ( this response, object result, StreamSerializerDelegate defaultAction, string defaultContentType ) : bool
response this The response.
result object Whether or not it was implicity handled by ServiceStack's built-in handlers.
defaultAction StreamSerializerDelegate The default action.
defaultContentType string Default response ContentType.
return bool

WriteToResponse() public static method

Writes to response.
public static WriteToResponse ( this response, object result, string defaultContentType ) : bool
response this The response.
result object Whether or not it was implicity handled by ServiceStack's built-in handlers.
defaultContentType string Default response ContentType.
return bool