Click or drag to resize
NonGenericEnumerableMessagePackSerializerBaseTCollectionCreateInstance Method
Creates a new collection instance with specified initial capacity.

Namespace: MsgPack.Serialization.CollectionSerializers
Assembly: MsgPack (in MsgPack.dll) Version: 0.6.0
Syntax
protected abstract TCollection CreateInstance(
	int initialCapacity
)

Parameters

initialCapacity
Type: SystemInt32
The initial capacy of creating collection. Note that this parameter may 0 for non-empty collection.

Return Value

Type: TCollection
New collection instance. This value will not be null.
Remarks
An author of Unpacker could implement unpacker for non-MessagePack format, so implementer of this interface should not rely on that initialCapacity reflects actual items count. For example, JSON unpacker cannot supply collection items count efficiently.
See Also