10.26.0

SDTUtilsSetSDTContainer Method

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.

WARNING: This method is intended to be used to add an existing message independent container to a message.That is, a container created by either CreateMap(Int32) or CreateStream(Int32). Do not call this method with a container that is already in the message, returned from a call to CreateMap(IMessage, Int32) or CreateStream(IMessage, Int32). That is unnecessary as the container is already in the message. Further, the first operation of SetSDTContainer(IMessage, ISDTContainer) is to wipe out the existing binary attachment.

Definition

Namespace: SolaceSystems.Solclient.Messaging.SDT
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 10.26.0
C#
public static void SetSDTContainer(
	IMessage msg,
	ISDTContainer container
)

Parameters

msg  IMessage
an IMessage instance
container  ISDTContainer
a ISDTContainer

Exceptions

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.

See Also