C# 클래스 MsgPack.Serialization.NonGenericMessagePackSerializer

상속: IMessagePackSingleObjectSerializer
파일 보기 프로젝트 열기: msgpack/msgpack-cli

공개 메소드들

메소드 설명
Pack ( Stream stream, object objectTree ) : void

Serializes specified object to the Stream.

Unpack ( Stream stream ) : object

Deserialize object from the Stream.

보호된 메소드들

메소드 설명
NonGenericMessagePackSerializer ( MsgPack.Serialization.SerializationContext ownerContext, Type targetType, PackerCompatibilityOptions packerCompatibilityOptions, SerializerCapabilities capabilities ) : System

Initializes a new instance of the NonGenericMessagePackSerializer class with explicitly specified compatibility option.

This method also supports backword compatibility with 0.4.

NonGenericMessagePackSerializer ( MsgPack.Serialization.SerializationContext ownerContext, Type targetType, SerializerCapabilities capabilities ) : System

Initializes a new instance of the NonGenericMessagePackSerializer class with explicitly specified compatibility option.

PackToCore ( Packer packer, object objectTree ) : void

Serializes specified object with specified Packer.

UnpackFromCore ( Unpacker unpacker ) : object

Deserializes object with specified Unpacker.

UnpackToCore ( Unpacker unpacker, object collection ) : void

Deserializes collection items with specified Unpacker and stores them to collection.

비공개 메소드들

메소드 설명
InternalPackSingleObject ( object objectTree ) : byte[]
InternalPackTo ( Packer packer, object objectTree ) : void
InternalUnpackFrom ( Unpacker unpacker ) : object
InternalUnpackSingleObject ( byte buffer ) : object
InternalUnpackTo ( Unpacker unpacker, object collection ) : void
JudgeNullable ( Type type ) : bool

메소드 상세

NonGenericMessagePackSerializer() 보호된 메소드

Initializes a new instance of the NonGenericMessagePackSerializer class with explicitly specified compatibility option.
This method also supports backword compatibility with 0.4.
is null.
protected NonGenericMessagePackSerializer ( MsgPack.Serialization.SerializationContext ownerContext, Type targetType, PackerCompatibilityOptions packerCompatibilityOptions, SerializerCapabilities capabilities ) : System
ownerContext MsgPack.Serialization.SerializationContext A which owns this serializer.
targetType System.Type The type to be serialized.
packerCompatibilityOptions PackerCompatibilityOptions The for new packer creation.
capabilities SerializerCapabilities The capability flags for this instance.
리턴 System

NonGenericMessagePackSerializer() 보호된 메소드

Initializes a new instance of the NonGenericMessagePackSerializer class with explicitly specified compatibility option.
is null.
protected NonGenericMessagePackSerializer ( MsgPack.Serialization.SerializationContext ownerContext, Type targetType, SerializerCapabilities capabilities ) : System
ownerContext MsgPack.Serialization.SerializationContext A which owns this serializer.
targetType System.Type The type to be serialized.
capabilities SerializerCapabilities The capability flags for this instance.
리턴 System

Pack() 공개 메소드

Serializes specified object to the Stream.
/// is null. /// /// The type of is not serializable etc. ///
public Pack ( Stream stream, object objectTree ) : void
stream Stream Destination .
objectTree object Object to be serialized.
리턴 void

PackToCore() 보호된 추상적인 메소드

Serializes specified object with specified Packer.
/// The type of is not serializable etc. ///
protected abstract PackToCore ( Packer packer, object objectTree ) : void
packer Packer which packs values in . This value will not be null.
objectTree object Object to be serialized.
리턴 void

Unpack() 공개 메소드

Deserialize object from the Stream.
/// is null. ///
public Unpack ( Stream stream ) : object
stream Stream Source .
리턴 object

UnpackFromCore() 보호된 추상적인 메소드

Deserializes object with specified Unpacker.
/// Failed to deserialize object due to invalid unpacker state, stream content, or so. /// /// Failed to deserialize object due to invalid unpacker state, stream content, or so. /// /// Failed to deserialize object due to invalid unpacker state, stream content, or so. ///
protected abstract UnpackFromCore ( Unpacker unpacker ) : object
unpacker Unpacker which unpacks values of resulting object tree. This value will not be null.
리턴 object

UnpackToCore() 보호된 메소드

Deserializes collection items with specified Unpacker and stores them to collection.
/// Failed to deserialize object due to invalid unpacker state, stream content, or so. /// /// The type of is not a collection. ///
protected UnpackToCore ( Unpacker unpacker, object collection ) : void
unpacker Unpacker which unpacks values of resulting object tree. This value will not be null.
collection object Collection that the items to be stored. This value will not be null.
리턴 void