C# Class MsgPack.Serialization.NonGenericMessagePackSerializer

Inheritance: IMessagePackSingleObjectSerializer
Afficher le fichier Open project: msgpack/msgpack-cli

Méthodes publiques

Méthode Description
Pack ( Stream stream, object objectTree ) : void

Serializes specified object to the Stream.

Unpack ( Stream stream ) : object

Deserialize object from the Stream.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

NonGenericMessagePackSerializer() protected méthode

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.
Résultat System

NonGenericMessagePackSerializer() protected méthode

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.
Résultat System

Pack() public méthode

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.
Résultat void

PackToCore() protected abstract méthode

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.
Résultat void

Unpack() public méthode

Deserialize object from the Stream.
/// is null. ///
public Unpack ( Stream stream ) : object
stream Stream Source .
Résultat object

UnpackFromCore() protected abstract méthode

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.
Résultat object

UnpackToCore() protected méthode

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.
Résultat void