Note: disposing the corresponding context (IContext) or any of its contained context timers (TimerTask), sessions (ISession) or flows (IFlow) must not be performed from within the registered delegates (messageEventHandler or sessionEventHandler).
ISession CreateSession(
SessionProperties props,
EventHandler<MessageEventArgs> messageEventHandler,
EventHandler<SessionEventArgs> sessionEventHandler
)
Client applications can call GetLastSDKErrorInfo from within the session event delegate to get more info on the type of error condition reported by SessionEventArgs.
OperationErrorException |
Thrown when unable to create the session. Possible sub-codes:
|
ObjectDisposedException | Thrown if the context is already disposed (terminal state). |
FatalErrorException | Thrown when an unrecoverable error occurs. |
ArgumentException | Thrown when invalid values of SessionProperties property values are detected. |