ServiceClientGenerator.CommandArguments.FindArgDeclaration C# (CSharp) Method

FindArgDeclaration() static private method

Scans the argument declaration table to find a matching entry for a token from the command line that is potentially an option keyword.
static private FindArgDeclaration ( string argument ) : ArgDeclaration
argument string Keyword found on the command line. Any prefixes will be removed before attempting to match.
return ArgDeclaration
        static ArgDeclaration FindArgDeclaration(string argument)
        {
            var keyword = argument.TrimStart(ArgumentPrefixes);
            return ArgumentsTable.FirstOrDefault(argDeclation
                => keyword.Equals(argDeclation.ShortName, StringComparison.OrdinalIgnoreCase)
                   || keyword.Equals(argDeclation.OptionName, StringComparison.OrdinalIgnoreCase));
        }