private static void RunJournal(Expression<Action<ServiceFabricJournalSpec>> x) { Console.ForegroundColor = ConsoleColor.White; var name = x.Body.ToString(); var action = x.Compile(); try { var test = new ServiceFabricJournalSpec(); action(test); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("{0} Success..",name); } catch { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0} Failed..",name); } }
private static void RunJournal(Expression <Action <ServiceFabricJournalSpec> > x) { Console.ForegroundColor = ConsoleColor.White; var name = x.Body.ToString(); var action = x.Compile(); try { var test = new ServiceFabricJournalSpec(); action(test); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("{0} Success..", name); } catch { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("{0} Failed..", name); } }