/// <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;
        }
        /// <summary>
        /// Initializes a new instance of the <c>LearningStorePrivilegedScope</c>
        /// </summary>
        /// <remarks>
        /// See <Typ>LearningStorePrivilegedScope</Typ> for more information.
        /// </remarks>
        public LearningStorePrivilegedScope()
        {
            m_priorScope = s_currentScope;

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