public static IDictionary<string, string> GetArguments(string[] args, int start)
{
var unprocessedArguments = new Dictionary<string, string>();
if ((args.Length - 1) % 2 != 0)
{
Trace.TraceError("Unexpected number of arguments");
return null;
}
for (var i = start; i < args.Length; i += 2)
{
// Remove hyphen from the beginning of the argument name.
var argumentName = args[i].TrimStart(Arguments.Prefix);
// Remove quotes (if any) from the start and end of the argument value.
var argumentValue = args[i + 1].Trim(Arguments.Quote);
unprocessedArguments.Add(argumentName, argumentValue);
}
var secretInjector = GetSecretInjector(unprocessedArguments);
return new SecretDictionary(secretInjector, unprocessedArguments);
}