Example #1
0
        internal static void Main(string[] args)
        {
            try
            {
                var argsDict = ParseArgs(args);

                if (!argsDict.Any())
                {
                    argsDict.Add("-taskfolder", Path.GetFullPath(@"..\..\..\TaskAssembly\bin\Debug"));
                    argsDict.Add("-executorfolder", Path.GetFullPath(@"..\..\..\ChildProcessExecutor\bin\Debug"));
                    argsDict.Add("-runparam", "world!");
                    argsDict.Add("-intiparam", "hello");
                }

                var childParams = createChildProcessArgs(typeof(SimpleTask), argsDict);
                var exec        = new RemoteExecutor(childParams.ExecutorFolder);

                var result = exec.ExecuteInSeparateProcess(childParams);

                Console.WriteLine("===================");
                Console.Write("Result: ");
                Console.WriteLine(result);
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc);
            }
            Console.ReadKey();
        }