PackerUnpackerExtensionsPackT Method (Packer, IEnumerableT, SerializationContext) |
Packs specified value with the specified context.
Namespace: MsgPackAssembly: MsgPack (in MsgPack.dll) Version: 0.6.0
Syntax public static Packer Pack<T>(
this Packer source,
IEnumerable<T> items,
SerializationContext context
)
<ExtensionAttribute>
Public Shared Function Pack(Of T) (
source As Packer,
items As IEnumerable(Of T),
context As SerializationContext
) As Packer
public:
[ExtensionAttribute]
generic<typename T>
static Packer^ Pack(
Packer^ source,
IEnumerable<T>^ items,
SerializationContext^ context
)
[<ExtensionAttribute>]
static member Pack :
source : Packer *
items : IEnumerable<'T> *
context : SerializationContext -> Packer
Parameters
- source
- Type: MsgPackPacker
The Packer. - items
- Type: System.Collections.GenericIEnumerableT
The collection to be serialized. - context
- Type: MsgPack.SerializationSerializationContext
The SerializationContext holds shared serializers.
Type Parameters
- T
- The type of the value.
Return Value
Type:
Packersource.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Packer. 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 See Also