private static void ModifyStopOptions(MDbgStopOptionPolicy.DebuggerBehavior command, string arguments) { MDbgStopOptions stopOptions = Shell.Properties[MDbgStopOptions.PropertyName] as MDbgStopOptions; if (arguments.Length < 2) { DisplayStopOptions(); } else { // Break up arguments string into the event type acronym and the arguments to // send to the actual stop option policy. For example, if the arguments string // is "ex System.Exception System.ArgumentException", this will be split into: // eventType = "ex" // args = "System.Exception System.ArgumentException" // If there are no arguments to send to the stop option policy, args is set to null. string eventType = arguments.Split()[0].Trim(); string args = null; if (arguments.Length > eventType.Length) { args = arguments.Substring(eventType.Length).Trim(); } stopOptions.ModifyOptions(eventType, command, args); } }
/// <summary> /// Default constructor. /// </summary> /// <param name="exceptionType">An exception type or regular expression.</param> /// <param name="behavior">Debugger behavior - stop, log, or ignore</param> public ExceptionStopOptionPolicyItem(string exceptionType, MDbgStopOptionPolicy.DebuggerBehavior behavior) { m_exceptionType = exceptionType; m_behavior = behavior; }