Search Results for

    Show / Hide Table of Contents

    Class CommandLineArgOptions

    Details the options expected for command line arguments

    Inheritance
    System.Object
    CommandLineArgOptions
    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 CommandLineArgOptions

    Properties

    DefaultArgumentCount

    The default argument count expected for each option

    Declaration
    public short DefaultArgumentCount { get; }
    Property Value
    Type Description
    System.Int16

    OptionPrefix

    The prefix all options must start with

    Declaration
    public string OptionPrefix { get; }
    Property Value
    Type Description
    System.String

    Methods

    AddOption(String)

    Adds a new option with the DefaultArgumentCount expected as the number of arguments for it

    Declaration
    public CommandLineArgOptions AddOption(string name)
    Parameters
    Type Name Description
    System.String name

    The name of the option

    Returns
    Type Description
    CommandLineArgOptions

    This CommandLineArgOptions so you can chain configuring the options

    AddOption(String, Int16)

    Adds a new option with the specified expectedNumberOfArgumentsAfter expected as the number of arguments for it

    Declaration
    public CommandLineArgOptions AddOption(string name, short expectedNumberOfArgumentsAfter)
    Parameters
    Type Name Description
    System.String name

    The name of the option

    System.Int16 expectedNumberOfArgumentsAfter

    The number of arguments expected with this option

    Returns
    Type Description
    CommandLineArgOptions

    This CommandLineArgOptions so you can chain configuring the options

    SetDefaultArgumentCount(Int16)

    Sets the default number of arguments expected associated with each option

    Declaration
    public CommandLineArgOptions SetDefaultArgumentCount(short defaultArgumentCount)
    Parameters
    Type Name Description
    System.Int16 defaultArgumentCount

    The default number of arguments expected associated with each option

    Returns
    Type Description
    CommandLineArgOptions

    This CommandLineArgOptions so you can chain configuring the options

    SetOptionPrefix(String)

    Sets the prefix expected for each option

    Declaration
    public CommandLineArgOptions SetOptionPrefix(string prefix = "/")
    Parameters
    Type Name Description
    System.String prefix

    The prefix expected for each option

    Returns
    Type Description
    CommandLineArgOptions

    This CommandLineArgOptions so you can chain configuring the options

    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.