📄 debuggersupportsevaluator.cs
字号:
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="none" email=""/>
// <version>$Revision: 915 $</version>
// </file>
using System;
using System.Xml;
using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core
{
/// <summary>
/// Tests if the debugger supports a certain feature.
/// </summary>
/// <attribute name="debuggersupports">
/// The name of the feature the debugger must support.
/// Possible feature names: "Start", "StartWithoutDebugging", "Stop",
/// "ExecutionControl", "Stepping".
/// </attribute>
/// <example title="Test if the debugger supports stepping">
/// <Condition name = "DebuggerSupports" debuggersupports="Stepping">
/// </example>
/// <example title="Test if the debugger supports killing the running application">
/// <Condition name = "DebuggerSupports" debuggersupports="Stop">
/// </example>
public class DebuggerSupportsConditionEvaluator : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
DebuggerDescriptor debugger = DebuggerService.Descriptor;
switch (condition.Properties["debuggersupports"]) {
case "Start":
return (debugger != null) ? debugger.SupportsStart : true;
case "StartWithoutDebugging":
return (debugger != null) ? debugger.SupportsStartWithoutDebugging : true;
case "Stop":
return (debugger != null) ? debugger.SupportsStop : true;
case "ExecutionControl":
return (debugger != null) ? debugger.SupportsExecutionControl : false;
case "Stepping":
return (debugger != null) ? debugger.SupportsStepping : false;
default:
throw new ArgumentException("Unknown debugger support for : >" + condition.Properties["debuggersupports"] + "< please fix addin file.", "debuggersupports");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -