Skip to main content

IContentTypeWriter

Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
public interface IContentTypeWriter

Methods

SerializeToBytes(IRequest, Object)

View Source
Declaration
byte[] SerializeToBytes(IRequest req, object response)
Returns

System.Byte[]

Parameters
TypeName
ServiceStack.Web.IRequestreq
System.Objectresponse

SerializeToString(IRequest, Object)

View Source
Declaration
string SerializeToString(IRequest req, object response)
Returns

System.String

Parameters
TypeName
ServiceStack.Web.IRequestreq
System.Objectresponse

SerializeToString(IRequest, Object, String)

View Source
Declaration
string SerializeToString(IRequest req, object response, string contentType)
Returns

System.String

Parameters
TypeName
ServiceStack.Web.IRequestreq
System.Objectresponse
System.StringcontentType

SerializeToStreamAsync(IRequest, Object, Stream)

View Source
Declaration
Task SerializeToStreamAsync(IRequest requestContext, object response, Stream toStream)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.Web.IRequestrequestContext
System.Objectresponse
System.IO.StreamtoStream

GetStreamSerializerAsync(String)

View Source
Declaration
StreamSerializerDelegateAsync GetStreamSerializerAsync(string contentType)
Returns

ServiceStack.Web.StreamSerializerDelegateAsync

Parameters
TypeName
System.StringcontentType