当前位置: 首页>>代码示例>>C#>>正文


C# IInteractiveWindow.WriteError方法代码示例

本文整理汇总了C#中IInteractiveWindow.WriteError方法的典型用法代码示例。如果您正苦于以下问题:C# IInteractiveWindow.WriteError方法的具体用法?C# IInteractiveWindow.WriteError怎么用?C# IInteractiveWindow.WriteError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IInteractiveWindow的用法示例。


在下文中一共展示了IInteractiveWindow.WriteError方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

        public Task<ExecutionResult> Execute(IReplWindow window, string arguments)
        {
            var eval = window.Evaluator as JReplEvaluator;
            if (eval != null) {
                if (eval.AttachEnabled) {
                    string error = eval.AttachDebugger();
                    if (error != null) {
                        window.WriteError("Failed to attach: " + error);
                    }
                } else {
                    window.WriteError(
            "Attaching to an interactive window requires enabling attach " +
            "support in Tools->Options->J Tools->Interactive Windows." +
            Environment.NewLine + Environment.NewLine +
            "This will cause the debugger to track necessary state to enable " +
            "debugging until the attach is requested.  Once enabled the " +
            "interactive window will need to be reset for the change to take " +
            "effect.");
                }
            } else {
                window.WriteError("attach only supports J interactive windows");
            }

            return ExecutionResult.Succeeded;
        }
开发者ID:borota,项目名称:JTVS,代码行数:25,代码来源:AttachDebuggerReplCommand.cs

示例2: Execute

 public Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments) {
     var eval = window.Evaluator as PythonDebugReplEvaluator;
     if (eval != null) {
         if (string.IsNullOrEmpty(arguments)) {
             eval.DisplayActiveThread();
         } else {
             long id;
             if (long.TryParse(arguments, out id)) {
                 eval.ChangeActiveThread(id, true);
             } else {
                 window.WriteError(String.Format("Invalid arguments '{0}'. Expected thread id.", arguments));
             }
         }
     }
     return ExecutionResult.Succeeded;
 }
开发者ID:KaushikCh,项目名称:PTVS,代码行数:16,代码来源:DebugReplThreadCommand.cs

示例3: Execute

 public Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments) {
     var eval = window.GetPythonDebugReplEvaluator();
     if (eval != null) {
         if (string.IsNullOrEmpty(arguments)) {
             eval.DisplayActiveFrame();
         } else {
             int id;
             if (int.TryParse(arguments, out id)) {
                 eval.ChangeActiveFrame(id);
             } else {
                 window.WriteError(String.Format("Invalid arguments '{0}'. Expected frame id.", arguments));
             }
         }
     }
     return ExecutionResult.Succeeded;
 }
开发者ID:jsschultz,项目名称:PTVS,代码行数:16,代码来源:DebugReplFrameCommand.cs

示例4: Execute

        public Task<ExecutionResult> Execute(IReplWindow window, string arguments)
        {
            var eval = window.Evaluator as JDebugReplEvaluator;
            if (eval != null) {
                if (string.IsNullOrEmpty(arguments)) {
                    eval.DisplayActiveProcess();
                } else {
                    int id;
                    if (int.TryParse(arguments, out id)) {
                        eval.ChangeActiveProcess(id, true);
                    } else {
                        window.WriteError(String.Format("Invalid arguments '{0}'. Expected process id.", arguments));
                    }
                }
            }

            return ExecutionResult.Succeeded;
        }
开发者ID:borota,项目名称:JTVS,代码行数:18,代码来源:DebugReplProcessCommand.cs


注:本文中的IInteractiveWindow.WriteError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。