private static void OnTaskStateChange(object sender, ITaskStateEventArg args) { if (args.NewState == TaskState.Failed) { var scheduler = (Scheduler)sender; var job = scheduler.OpenJob(args.JobId); var task = job.OpenTask(args.TaskId); string output = task.Output; if (!String.IsNullOrWhiteSpace(output)) { var outWin = (IVsOutputWindow)HpcSupportPackage.GetGlobalService(typeof(IVsOutputWindow)); IVsOutputWindowPane pane; if (ErrorHandler.Succeeded(outWin.GetPane(VSConstants.GUID_OutWindowGeneralPane, out pane))) { pane.Activate(); pane.OutputString(output); } } } }
private static void OnTaskStateChange(object sender, ITaskStateEventArg args) { if (args.NewState == TaskState.Failed) { var scheduler = (Scheduler)sender; var job = scheduler.OpenJob(args.JobId); var task = job.OpenTask(args.TaskId); string output = task.Output; if (!String.IsNullOrWhiteSpace(output)) { var outWin = (IVsOutputWindow)HpcSupportPackage.GetGlobalService(typeof(IVsOutputWindow)); IVsOutputWindowPane pane; if (ErrorHandler.Succeeded(outWin.GetPane(VSConstants.GUID_OutWindowGeneralPane, out pane))) { pane.Activate(); pane.OutputString(output); } } } }