NonGenericDictionaryMessagePackSerializerTDictionaryCreateInstance Method |
Creates a new collection instance with specified initial capacity.
Namespace: MsgPack.Serialization.CollectionSerializersAssembly: MsgPack (in MsgPack.dll) Version: 0.6.0
Syntax protected abstract TDictionary CreateInstance(
int initialCapacity
)
Protected MustOverride Function CreateInstance (
initialCapacity As Integer
) As TDictionary
protected:
virtual TDictionary CreateInstance(
int initialCapacity
) abstract
abstract CreateInstance :
initialCapacity : int -> 'TDictionary
Parameters
- initialCapacity
- Type: SystemInt32
The initial capacy of creating collection.
Note that this parameter may 0 for non-empty collection.
Return Value
Type:
TDictionary
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