Mono.GetOptions.OptionDetails.IsThisOption C# (CSharp) Метод

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

private IsThisOption ( string arg ) : bool
arg string
Результат bool
		private bool IsThisOption(string arg)
		{
			if (arg != null && arg != string.Empty)
			{
				arg = arg.TrimStart('-', '/');
				if (VBCStyleBoolean)
					arg = arg.TrimEnd('-', '+');
				return (arg == ShortForm || arg == LongForm || arg == AlternateForm);
			}
			return false;
		}

Usage Example

Пример #1
0
        private bool IsAlternate(string compoundArg)
        {
            OptionDetails next = NextAlternate;

            while (next != null)
            {
                if (next.IsThisOption(compoundArg))
                {
                    return(true);
                }
                next = next.NextAlternate;
            }
            return(false);
        }