public static OutputProgressMonitor GetProgressMonitor(this LogView logView, bool clearConsole) { if (clearConsole) { return(logView.GetProgressMonitor()); } var method = logView.GetType().GetMethod("GetProgressMonitor", BindingFlags.Instance | BindingFlags.NonPublic); if (method != null) { return((OutputProgressMonitor)method.Invoke(logView, new object [] { clearConsole })); } return(logView.GetProgressMonitor()); }