static void Main(string[] args) { var w = new Worker(); var ac = w.ProcessDirectory(); ac.Invoke(new DirectoryInfo(Environment.CurrentDirectory)) ; }