protected override void OnDataReceived(IExecutionContext ctx, object data) { if (data is string) { Console.WriteLine(data); } if (data is DataTable) { var dt = data as DataTable; using (var fmt = new TextFormatter(null)) Console.WriteLine(fmt.FormatDataTable(dt)); } }