/// <summary>
        /// Ends the privileged scope.
        /// </summary>
        /// <remarks>
        /// See <Typ>LearningStorePrivilegedScope</Typ> for more information.
        /// </remarks>
        public void Dispose()
        {
            // Skip if already disposed
            if (m_disposed)
            {
                return;
            }

            if (m_nextScope != null)
            {
                // There are scopes "above" this one -- which means the user called
                // Dispose out-of-order.

                // First dispose the scope(s) above this one
                m_nextScope.Dispose();
                if (m_nextScope != null)
                {
                    throw new LearningComponentsInternalException("LSTR3120");
                }
                if (s_currentScope != this)
                {
                    throw new LearningComponentsInternalException("LSTR3130");
                }
            }

            // Leave the scope
            if (m_priorScope != null)
            {
                m_priorScope.m_nextScope = null;
            }
            s_currentScope = m_priorScope;

            // Mark as disposed
            m_disposed = true;
        }