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

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

Parameters

source
Type: MsgPack.SerializationIMessagePackSerializer
IMessagePackSerializer object.
stream
Type: System.IOStream
Destination Stream.
objectTree
Type: SystemObject
Object to be serialized.

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