Click or drag to resize
MessagePackSerializerExtensionsPack Method (IMessagePackSerializer, Stream, Object, PackerCompatibilityOptions)
Serializes specified object to the Stream.

Namespace: MsgPack.Serialization
Assembly: MsgPack (in MsgPack.dll) Version: 0.6.0
Syntax
public static void Pack(
	this IMessagePackSerializer source,
	Stream stream,
	Object objectTree,
	PackerCompatibilityOptions packerCompatibilityOptions
)

Parameters

source
Type: MsgPack.SerializationIMessagePackSerializer
IMessagePackSerializer object.
stream
Type: System.IOStream
Destination Stream.
objectTree
Type: SystemObject
Object to be serialized.
packerCompatibilityOptions
Type: MsgPackPackerCompatibilityOptions
A PackerCompatibilityOptions which specifies compatibility options.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IMessagePackSerializer. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionsource is null. Or stream is null.
SerializationException Failed to serialize objectTree.
See Also