//
 // Construct a new instance with the given stock compiler that is to be
 // attached.
 //
 public ScriptCompilerHook(IScriptCompiler StandardCompiler,
     ResourceAccessor ResourceAccessor,
     SettingsManager SettingsMgr)
 {
     m_Disposed = false;
     m_StandardCompiler = StandardCompiler;
     m_ResourceAccessor = ResourceAccessor;
     m_SettingsManager = SettingsMgr;
     m_NscCompiler = new NscCompiler(ResourceAccessor, SettingsMgr);
 }
        //
        // Construct a new instance with the given stock compiler that is to be
        // attached.
        //

        public ScriptCompilerHook(IScriptCompiler StandardCompiler,
                                  ResourceAccessor ResourceAccessor,
                                  SettingsManager SettingsMgr)
        {
            m_Disposed         = false;
            m_StandardCompiler = StandardCompiler;
            m_ResourceAccessor = ResourceAccessor;
            m_SettingsManager  = SettingsMgr;
            m_NscCompiler      = new NscCompiler(ResourceAccessor, SettingsMgr);
        }
        protected virtual void Dispose(bool Disposing)
        {
            if (m_Disposed)
                return;

            if (m_StandardCompiler != null)
            {
                m_StandardCompiler.Dispose();
                m_StandardCompiler = null;
            }

            if (m_NscCompiler != null)
            {
                m_NscCompiler.Dispose();
                m_NscCompiler = null;
            }
        }