Skip to main content

MsgPackFormat

Assembly: ServiceStack.MsgPack.dll​
View Source​
Declaration
public class MsgPackFormat : IPlugin, IMsgPackPlugin, IHasStringId, IHasId<string>

Properties​

Id​

View Source​
Declaration
public string Id { get; set; }

Methods​

Register(IAppHost)​

View Source​
Declaration
public void Register(IAppHost appHost)
Parameters​
TypeName
ServiceStack.IAppHostappHost

Serialize(IRequest, Object, Stream)​

View Source​
Declaration
public static void Serialize(IRequest requestContext, object dto, Stream outputStream)
Parameters​
TypeName
ServiceStack.Web.IRequestrequestContext
System.Objectdto
System.IO.StreamoutputStream

Serialize(Object, Stream)​

View Source​
Declaration
public static void Serialize(object dto, Stream outputStream)
Parameters​
TypeName
System.Objectdto
System.IO.StreamoutputStream

Deserialize(Type, Stream)​

View Source​
Declaration
public static object Deserialize(Type type, Stream fromStream)
Returns​

System.Object

Parameters​
TypeName
System.Typetype
System.IO.StreamfromStream

HandleException(Exception, Type)​

MsgPack throws an exception for empty DTO's - normalizing the behavior to follow other types and return an empty instance.

View Source​
Declaration
public static object HandleException(Exception ex, Type type)
Returns​

System.Object

Parameters​
TypeName
System.Exceptionex
System.Typetype

Implements​