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
Type | Name |
---|---|
ServiceStack.IAppHost | appHost |
Serialize(IRequest, Object, Stream)
View Source
Declaration
public static void Serialize(IRequest requestContext, object dto, Stream outputStream)
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | requestContext |
System.Object | dto |
System.IO.Stream | outputStream |
Serialize(Object, Stream)
View Source
Declaration
public static void Serialize(object dto, Stream outputStream)
Parameters
Type | Name |
---|---|
System.Object | dto |
System.IO.Stream | outputStream |
Deserialize(Type, Stream)
View Source
Declaration
public static object Deserialize(Type type, Stream fromStream)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | type |
System.IO.Stream | fromStream |
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
Type | Name |
---|---|
System.Exception | ex |
System.Type | type |