Example #1
0
        ///<summary>
        /// enables or disables notifications for a particular type 
        /// </summary>
        /// <param name="argString">string including the fully qualified type name and a "1" or "0" to 
        /// indicate whether to enable or disable
        /// </param>
        public static void EnableCustomNotificationCmd(string argString)
        {
            ArgParser args = new ArgParser(argString);
            if (args.Count != 2)
            {
                throw new MDbgShellException("Expected 2 arguments");
            }

            string name = args.AsString(0);
            bool fEnable = args.AsBool(1);

            CorClass c = Debugger.Processes.Active.ResolveClass(name);
            Debugger.Processes.Active.CorProcess.SetEnableCustomNotification(c, fEnable);
            if (fEnable)
            {
                ModifyStopOptions(MDbgStopOptionPolicy.DebuggerBehavior.Notify, "cn");
            }

        }