SDTUtilsCreateMap(IMessage, Int32) Method
This method creates a map container (IMapContainer) in the binary attachment part of the
given message, and any existing data is overwritten. The returned IMapContainer instance
can be later used to add SDT fields.
It is recommended to Close the IMapContainer when done. If it is not explicitly closed,
the IMapContainer is automatically closed when the associated message is disposed
IDisposable.
Whether it is explicitly closed by the client application, or implicitly by the API, any attempt to use
this map will result in an OperationErrorException with ParamNullReference
error subcode.
Namespace: SolaceSystems.Solclient.Messaging.SDTAssembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.26.0
public static IMapContainer CreateMap(
IMessage message,
int initialSize
)
- message IMessage
- The message to create the map container in.
- initialSize Int32
-
This value must be greater or equal to zero.
It hints to the size of the map that will be created, it is used to
determine the size of datablock to allocate. If it is too small for the
subsequently created map, a larger datablock is allocated when
necessary and existing SDT data is copied into place. This reallocation
can negatively affect performance.
IMapContainerThe created map container.
OperationErrorException |
Thrown when an error occurs. In this case
ReturnCode and SDKErrorInfo are accessible from OperationErrorException
and contain more information.
|
FatalErrorException |
Thrown when an unrecoverable error occurs.
|
ArgumentNullException |
Thrown when the message is null.
|
ArgumentOutOfRangeException |
Thrown when initial size is less than zero.
|