public void ApplyCommandLineArguments(ProcessWideConfig processWideConfig, IEnumerable <TestConfig> testConfigCollection)
        {
            Agent.LogUtil.LogMessage("Parsing command line arguments if any provided...");
            var arguments = Environment.GetCommandLineArgs().Skip(1).Where(x => !string.IsNullOrEmpty(x) && !string.IsNullOrWhiteSpace(x))
                            .Select((x) => new Argument(x.Trim()));

            if (arguments.Count() < 1)
            {
                return;
            }

            Agent.LogUtil.LogMessage("Applying command line arguments...");
            foreach (var argument in arguments)
            {
                ApplyArgument(argument, processWideConfig, testConfigCollection);
            }
        }
        private void ApplyArgument(Argument argument, ProcessWideConfig processWideConfig, IEnumerable <TestConfig> testConfigCollection)
        {
            if (argument.Locator.ToLower() == "ProcessWideConfig".ToLower())
            {
                ApplyArgument(argument, processWideConfig);
                return;
            }

            if (argument.Locator.ToLower() == "TestingConfigurations".ToLower())
            {
                testConfigCollection.Select(x => { ApplyArgument(argument, x); return(x); });
                return;
            }

            TestConfig testConfig = testConfigCollection.Where(x => x.OriginalID.ToLower() == argument.Locator.ToLower()).First();

            if (testConfig != null)
            {
                ApplyArgument(argument, testConfig);
                return;
            }

            throw new ArgumentException(string.Format("{0} is not a valid command line argument", argument));
        }