Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="arguments"></param>
        /// <param name="logger"></param>
        /// <exception cref="ArgumentException"></exception>
        public ArgumentParse(string[] arguments, ILogger logger)
        {
            var tokens = ArgumentToken.ParseArgument(arguments);

            logger.WriteLog("Detecting options from arguments...", LogLevel.Debug);
            var(optionCollection, remainingTokens) = ArgumentOptionCollection.LoadArgumentOptionCollection(tokens, logger);

            logger.WriteLog("Searching source image files from arguments...", LogLevel.Debug);
            var sourceFiles = SearchSourceFiles(optionCollection, remainingTokens, logger);

            this.OptionCollection = optionCollection;
            this.SourceFiles      = sourceFiles;

            logger.WriteLog("Finished parsing arguments", LogLevel.Debug);
        }
 private static bool IsOptionDeclarationToken(ArgumentToken token) => token.Token.StartsWith("-");