Search Results for

    Show / Hide Table of Contents

    Class CommandLineArgParser

    A class for common operations around resolving command line arguments

    Inheritance
    System.Object
    CommandLineArgParser
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LemonEdge.Utils
    Assembly: Utils.dll
    Syntax
    public class CommandLineArgParser

    Constructors

    CommandLineArgParser(CommandLineArgOptions, String[])

    Creates a a command line parser with the specified options

    Declaration
    public CommandLineArgParser(CommandLineArgOptions options, string[] args)
    Parameters
    Type Name Description
    CommandLineArgOptions options

    The options for the parameters to be parsed

    System.String[] args

    The list of args from the main command line method

    Methods

    GetOptionArgument(String, Int16)

    Returns the argument associated with the specified option parsed from the command line arguments

    Declaration
    public string GetOptionArgument(string optionName, short argumentIndex)
    Parameters
    Type Name Description
    System.String optionName

    The name of the option to return an argument for

    System.Int16 argumentIndex

    The index (0 based) of the argument to return for this option

    Returns
    Type Description
    System.String

    The argument associated with the specified option parsed from the command line arguments

    HasOption(String)

    Returns true if the specified option has been included in the parsed arguments

    Declaration
    public bool HasOption(string optionName)
    Parameters
    Type Name Description
    System.String optionName

    The name of the option to check for in the parsed arguments

    Returns
    Type Description
    System.Boolean

    True if the specified option has been included in the parsed arguments

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.