// This class implements the console user interface of the application. public Runner(Interfaces.IUI ui) { this.ui = ui; string nspace = "AdventureWorks.Methods"; int iMethodCount = 0; var types = Assembly.GetExecutingAssembly().GetTypes() .Where(t => t.IsClass && t.Namespace == nspace && t.Name.Substring(0, 3) != "<>c"); types.ToList().ForEach(t => { Dictionary <string, UiOption> uiOptionsType = GetUIOptionsOfType(t, iMethodCount); uiOptions = uiOptions.Select(u => u).Concat(uiOptionsType).ToDictionary(w => w.Key, w => w.Value); iMethodCount += uiOptions.Count; }); }
public static void Print(Interfaces.IUI ui, IEnumerable <string> enumerable) { string text = string.Join(Constant.SEPARATOR, enumerable.ToArray()); ui.Output(text, "Result"); }
public void SetUI(IUI ui) { this.ui = ui; }