SonarQube.Common.CommandLineParser.TryGetMatchingDescriptor C# (CSharp) Метод

TryGetMatchingDescriptor() приватный Метод

Attempts to find a descriptor for the current argument
private TryGetMatchingDescriptor ( string argument, SonarQube.Common.ArgumentDescriptor &descriptor, string &prefix ) : bool
argument string The argument passed on the command line
descriptor SonarQube.Common.ArgumentDescriptor The descriptor that matches the argument
prefix string The specific prefix that was matched
Результат bool
        private bool TryGetMatchingDescriptor(string argument, out ArgumentDescriptor descriptor, out string prefix)
        {
            descriptor = null;
            prefix = null;

            bool found = false;

            foreach (ArgumentDescriptor item in this.descriptors)
            {
                string match = TryGetMatchingPrefix(item, argument);
                if (match != null)
                {
                    descriptor = item;
                    prefix = match;
                    found = true;
                    break;
                }
            }
            return found;
        }