Example #1
0
        // 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;
            });
        }
Example #2
0
        public static void Print(Interfaces.IUI ui, IEnumerable <string> enumerable)
        {
            string text = string.Join(Constant.SEPARATOR, enumerable.ToArray());

            ui.Output(text, "Result");
        }
Example #3
0
 public void SetUI(IUI ui)
 {
     this.ui = ui;
 }