public static string RenderBotLeafTaskTypeToString(IBotTask leafTask) { return(new[] { leafTask.ContainsEffect() ? "Effect" : null, leafTask is DiagnosticTask ? "Diagnostic: \"" + (leafTask as DiagnosticTask)?.MessageText + "\"" : null }.WhereNotDefault().FirstOrDefault()); }
static public bool ShouldBeIncludedInStepOutput(this IBotTask task) => (task?.ContainsEffect() ?? false) || task is DiagnosticTask;