Esempio n. 1
0
                public Session(Connection connection, SessionInfo info, AcknowledgementMode acknowledgementMode)
                {
                        this.connection = connection;
                        this.info = info;
                        this.acknowledgementMode = acknowledgementMode;
						this.asyncSend = connection.AsyncSend;
                        transactionContext = new TransactionContext(this);
                        dispatchingThread = new DispatchingThread(new DispatchingThread.DispatchFunction(DispatchAsyncMessages));
                        dispatchingThread.ExceptionListener += new DispatchingThread.ExceptionHandler(dispatchingThread_ExceptionListener);
                }
Esempio n. 2
0
 protected SessionInfo CreateSessionInfo(AcknowledgementMode acknowledgementMode)
 {
     SessionInfo answer = new SessionInfo();
     SessionId sessionId = new SessionId();
     sessionId.ConnectionId = info.ConnectionId.Value;
     lock (this)
     {
         sessionId.Value = ++sessionCounter;
     }
     answer.SessionId = sessionId;
     return answer;
 }