Execute() public method

public Execute ( string args, IWorker worker ) : void
args string
worker IWorker
return void
Exemplo n.º 1
0
        static void Main(string[] args)
        {
            IWorker worker = new ConsoleWorker();

            try
            {
                var app = new Application();
                app.Execute(args, worker);
                worker.WriteLine("Command successfully executed.");
            }
            catch (Exception e)
            {
                worker.WriteLine(e.Message);
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            IWorker worker = new ConsoleWorker();

            try
            {
                var app = new Application();
                app.Execute(args, worker);
                worker.WriteLine("Command successfully executed.");
            }
            catch (Exception e)
            {
                worker.WriteLine(e.Message);
            }
        }