static void Main(string[] args) { var yuv = new YuvModel(); var helpers = new Helpers(yuv); var filter = new Filter(yuv, helpers); var config = new ConfigurationMethods(Console.ReadLine, Console.Write, yuv, helpers); var controller = new CustomController(Console.ReadLine, Console.Write, config); ConfigStartup(args, filter); while (true) { Console.Clear(); GetAssemblyInfo(); if (keepInstancesAlive is "no") { LoadNewFile(filter); GetAssemblyInfo(); } controller.Build() .ApplyFilter(value) .Out(); GetNextAction(); } }
/// <summary> /// Custom controller constructor using Dependecy Injection for handling console input/output and given yuv model. /// </summary> public CustomController(Func <string> inputProvider, Action <string> outputProvider, ConfigurationMethods config) { _inputProvider = inputProvider; _outputProvider = outputProvider; _config = config; }