private void UnloadClassEventHandler(Object sender, CorClassEventArgs e)
        {
            OriginalMDbgMessages.WriteLine("ManagedCallback::UnloadClass");
            if (InternalHandleRawMode(ManagedCallbackType.OnClassUnload, e))
                return;

            if (HandleCustomPostCallback(ManagedCallbackType.OnClassUnload, e))
                return;

            if (m_engine.Options.StopOnClassLoad)
            {
                e.Continue = false;
                InternalSignalRuntimeIsStopped(null, new ClassUnloadedStopReason());
            }
        }
        private void LoadClassEventHandler(Object sender, CorClassEventArgs e)
        {
            CorClass c = e.Class;
            OriginalMDbgMessages.WriteLine(string.Format("ManagedCallback::LoadClass:[{0}],0x{1:x}", c.Module.Name, c.Token));
            CorModule corModule = e.Class.Module;

            if (corModule.IsDynamic)
            {
                // we receive LoadClass callbacks always for dynamic modules.
                // if the module is dynamic, there is a chance that this callback
                // is caused by newly defined class. In this case we should bind any
                // breakpoints for such module.
                //
                MDbgModule m = m_moduleMgr.Lookup(corModule);
                Debug.Assert(m != null);
                m_breakpointMgr.BindBreakpoints(m);
            }

            if (InternalHandleRawMode(ManagedCallbackType.OnClassLoad, e))
                return;

            if (HandleCustomPostCallback(ManagedCallbackType.OnClassLoad, e))
                return;

            if (m_engine.Options.StopOnClassLoad)
            {
                e.Continue = false;
                InternalSignalRuntimeIsStopped(null, new ClassLoadedStopReason(c));
            }
        }