PackerUnpackerExtensionsPackCollectionT Method (Packer, IEnumerableT, SerializationContext) |
Packs specified collection with the specified context.
Namespace: MsgPackAssembly: MsgPack (in MsgPack.dll) Version: 0.6.0
Syntax public static Packer PackCollection<T>(
this Packer source,
IEnumerable<T> collection,
SerializationContext context
)
<ExtensionAttribute>
Public Shared Function PackCollection(Of T) (
source As Packer,
collection As IEnumerable(Of T),
context As SerializationContext
) As Packer
public:
[ExtensionAttribute]
generic<typename T>
static Packer^ PackCollection(
Packer^ source,
IEnumerable<T>^ collection,
SerializationContext^ context
)
[<ExtensionAttribute>]
static member PackCollection :
source : Packer *
collection : IEnumerable<'T> *
context : SerializationContext -> Packer
Parameters
- source
- Type: MsgPackPacker
The Packer. - collection
- Type: System.Collections.GenericIEnumerableT
The collection to be serialized. - context
- Type: MsgPack.SerializationSerializationContext
The SerializationContext holds shared serializers.
Type Parameters
- T
- The type of items of the collection.
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