SDTUtils Methods

Solclient

SDTUtils Methods
version: 7.2.1.27

The SDTUtils type exposes the following members.

Methods
  Name Description
Public method Static member CreateMap(Int32)
Allocates a memory buffer of size maxSize on the heap and creates a message-independent (free standing) IMapContainer within.

If the subsequent calls to add structured data types exceeds the buffer size an error (InsufficientSpace) is returned to the application.

Note: When using message-indpendent maps, it's an error to have more than one open subcontainer at once. In other words, client applications must close the open subcontainer before creating a new one. If such attempt is made, client applications will get an error with SDKErrorSubcode equal to OutOfMemory. Note that this limitation is not present with maps created with CreateMap(IMessage, Int32).

Note: Applications should call Dispose as soon as they're done with the map. Message-independent containers, when created, allocate memory resources.

Public method Static member CreateMap(IMessage, Int32)
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.

Public method Static member CreateStream(Int32)
Allocates a memory buffer of size bufferSize on the heap and creates a message-independent (free standing) IStreamContainer within.

If the subsequent calls to add structured data types exceeds the buffer size an error (InsufficientSpace) is returned to the application.

Note: When using message-indpendent streams, it's an error to have more than one open subcontainer at once. In other words, client applications must close the open subcontainer before creating a new one. If such attempt is made, client applications will get an error with SDKErrorSubcode equal to OutOfMemory. Note that this limitation is not present with streams created with CreateStream(IMessage, Int32).

Note: Applications should call Dispose as soon as they're done with the stream. Message-independent containers, when created, allocate memory resources.

Public method Static member CreateStream(IMessage, Int32)
Creates a stream container (IStreamContainer) in the binary attachment part of the given message. Any existing data is overwritten. The returned IStreamContainer instance can be later used to add SDT fields. It is recommended to Close the IStreamContainer when done. If it is not explicitly closed, the stream 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 stream will result in an OperationErrorException with ParamNullReference error subcode.

Public method Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected method Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public method Static member GetContainer
Returns an ISDTContainer (if available) within a message. The ISDTContainer could be either a IMapContainer or IStreamContainer. It is recommended to Close the ISDTContainer when done. If it is not explicitly closed, the container is automatically closed when the associated message is sent or disposed IDisposable.

Whether it is explicitly closed by the client application, or implicitly by the API, any attempt to use this container will result in an OperationErrorException with ParamNullReference error subcode.

Public method GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public method Static member GetText
If the message's binary payload contains a string, this method will return it. Otherwise it will return null.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Static member SetSDTContainer
Sets an SDT container as the binary attachment of a message. Any existing data in the message is overwritten. This method copies in from the given container, therefore changes to the container after this method returns will not be propagated to the message.
Public method Static member SetText
Sets the binary attachment part of the message to the specified utf8 encoded string.
Public method ToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
See Also