debuggersupportsevaluator.cs
来自「SharpDevelop2.0.0 c#开发免费工具」· CS 代码 · 共 51 行
CS
51 行
// <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 + =
减小字号Ctrl + -
显示快捷键?