コード例 #1
0
        public MapResponse CompleteTransaction(IGlymaSession glymaSession, Guid sessionId)
        {
            MapSession session = glymaSession.Session;

            MapResponse response = new MapResponse();

            using (IDbConnectionAbstraction parametersDbConnection = glymaSession.ConnectionFactory.CreateParametersDbConnection())
            {
                while (session.Count > 0)
                {
                    MapTransactionWrapper transaction = session.Dequeue();

                    transaction.ExecuteOperation(ref response);

                    transaction.ResponseParameter.PersistSessionObject(parametersDbConnection);
                }

                SessionFinalisation sessionFinalisation = new SessionFinalisation(glymaSession, sessionId);
                sessionFinalisation.ExecuteCompleteSession();

                return response;
            }
        }
コード例 #2
0
        public bool IsSessionCompleted(IGlymaSession glymaSession, Guid sessionId)
        {
            SessionFinalisation sessionFinalisation = new SessionFinalisation(glymaSession, sessionId);
            bool isSessionCompleted = sessionFinalisation.ExecuteIsCompletedQuery();

            return isSessionCompleted;
        }