Пример #1
0
        private bool isJuxtaPos(string flag)
        {
            int       max         = -1;
            StrOption currLongest = null;

            foreach (string k in this.longFlags)
            {
                Option o = this.options.GetValueOrDefault(k, null);
                if (o.GetType() == typeof(StrOption))
                {
                    StrOption so  = o as StrOption;
                    int       num = so.LongestJuxtaPos(flag);
                    if (num > 0 && num > max)
                    {
                        max         = num;
                        currLongest = so;
                    }
                }
            }

            if (currLongest != null)
            {
                currLongest.isSet = true;
                currLongest.AddParameter(flag.Substring(max));
                return(true);
            }

            return(false);
        }