C# Класс MsgPack.Serialization.NonGenericMessagePackSerializer

Наследование: IMessagePackSingleObjectSerializer
Показать файл Открыть проект

Открытые методы

Метод Описание
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