Search Results for

    Show / Hide Table of Contents

    Class CommandLineOptions

    CommandLineOptions is the base class the specific option classes used for nunit3-console and nunitlite. It encapsulates all common settings and features of both. This is done to ensure that common features remain common and for the convenience of having the code in a common location. The class inherits from the Mono Options OptionSet class and provides a central location for defining and parsing options.

    Inheritance
    object
    Collection<Option>
    KeyedCollection<string, Option>
    OptionSet
    CommandLineOptions
    NUnitLiteOptions
    Implements
    IList<Option>
    ICollection<Option>
    IList
    ICollection
    IReadOnlyList<Option>
    IReadOnlyCollection<Option>
    IEnumerable<Option>
    IEnumerable
    Inherited Members
    OptionSet.MessageLocalizer(string)
    OptionSet.GetKeyForItem(Option)
    OptionSet.InsertItem(int, Option)
    OptionSet.RemoveItem(int)
    OptionSet.SetItem(int, Option)
    OptionSet.Add(Option)
    OptionSet.Add(string, Action<string>)
    OptionSet.Add(string, string, Action<string>)
    OptionSet.Add(string, OptionAction<string, string>)
    OptionSet.Add(string, string, OptionAction<string, string>)
    OptionSet.Add<T>(string, Action<T>)
    OptionSet.Add<T>(string, string, Action<T>)
    OptionSet.Add<TKey, TValue>(string, OptionAction<TKey, TValue>)
    OptionSet.Add<TKey, TValue>(string, string, OptionAction<TKey, TValue>)
    OptionSet.CreateOptionContext()
    OptionSet.Parse(IEnumerable<string>)
    OptionSet.GetOptionParts(string, out string, out string, out string, out string)
    OptionSet.Parse(string, OptionContext)
    OptionSet.WriteOptionDescriptions(TextWriter)
    KeyedCollection<string, Option>.Contains(string)
    KeyedCollection<string, Option>.TryGetValue(string, out Option)
    KeyedCollection<string, Option>.Remove(string)
    KeyedCollection<string, Option>.ChangeItemKey(Option, string)
    KeyedCollection<string, Option>.ClearItems()
    KeyedCollection<string, Option>.GetKeyForItem(Option)
    KeyedCollection<string, Option>.InsertItem(int, Option)
    KeyedCollection<string, Option>.RemoveItem(int)
    KeyedCollection<string, Option>.SetItem(int, Option)
    KeyedCollection<string, Option>.Comparer
    KeyedCollection<string, Option>.this[string]
    KeyedCollection<string, Option>.Dictionary
    Collection<Option>.Clear()
    Collection<Option>.CopyTo(Option[], int)
    Collection<Option>.Contains(Option)
    Collection<Option>.GetEnumerator()
    Collection<Option>.IndexOf(Option)
    Collection<Option>.Insert(int, Option)
    Collection<Option>.Remove(Option)
    Collection<Option>.RemoveAt(int)
    Collection<Option>.ClearItems()
    Collection<Option>.Count
    Collection<Option>.Items
    Collection<Option>.this[int]
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Common
    Assembly: nunitlite.dll
    Syntax
    public class CommandLineOptions : OptionSet, IList<Option>, ICollection<Option>, IList, ICollection, IReadOnlyList<Option>, IReadOnlyCollection<Option>, IEnumerable<Option>, IEnumerable

    Constructors

    View Source

    CommandLineOptions(bool, params string[])

    Declaration
    public CommandLineOptions(bool requireInputFile, params string[] args)
    Parameters
    Type Name Description
    bool requireInputFile
    string[] args

    Properties

    View Source

    DefaultTestNamePattern

    Declaration
    public string DefaultTestNamePattern { get; }
    Property Value
    Type Description
    string
    View Source

    DefaultTimeout

    Declaration
    public int DefaultTimeout { get; }
    Property Value
    Type Description
    int
    View Source

    DefaultTimeoutSpecified

    Declaration
    public bool DefaultTimeoutSpecified { get; }
    Property Value
    Type Description
    bool
    View Source

    DisplayTestLabels

    Declaration
    public string DisplayTestLabels { get; }
    Property Value
    Type Description
    string
    View Source

    ErrFile

    Declaration
    public string ErrFile { get; }
    Property Value
    Type Description
    string
    View Source

    ErrFileSpecified

    Declaration
    public bool ErrFileSpecified { get; }
    Property Value
    Type Description
    bool
    View Source

    ErrorMessages

    Declaration
    public IList<string> ErrorMessages { get; }
    Property Value
    Type Description
    IList<string>
    View Source

    Explore

    Declaration
    public bool Explore { get; }
    Property Value
    Type Description
    bool
    View Source

    ExploreOutputSpecifications

    Declaration
    public IList<OutputSpecification> ExploreOutputSpecifications { get; }
    Property Value
    Type Description
    IList<OutputSpecification>
    View Source

    InputFile

    Declaration
    public string InputFile { get; }
    Property Value
    Type Description
    string
    View Source

    InputFileRequired

    Indicates whether an input file is required on the command-line. Note that multiple input files are never allowed.

    Declaration
    public bool InputFileRequired { get; set; }
    Property Value
    Type Description
    bool
    View Source

    InternalTraceLevel

    Declaration
    public string InternalTraceLevel { get; }
    Property Value
    Type Description
    string
    View Source

    InternalTraceLevelSpecified

    Declaration
    public bool InternalTraceLevelSpecified { get; }
    Property Value
    Type Description
    bool
    View Source

    NoColor

    Declaration
    public bool NoColor { get; }
    Property Value
    Type Description
    bool
    View Source

    NoHeader

    Declaration
    public bool NoHeader { get; }
    Property Value
    Type Description
    bool
    View Source

    NumberOfTestWorkers

    Declaration
    public int NumberOfTestWorkers { get; }
    Property Value
    Type Description
    int
    View Source

    NumberOfTestWorkersSpecified

    Declaration
    public bool NumberOfTestWorkersSpecified { get; }
    Property Value
    Type Description
    bool
    View Source

    OutFile

    Declaration
    public string OutFile { get; }
    Property Value
    Type Description
    string
    View Source

    OutFileSpecified

    Declaration
    public bool OutFileSpecified { get; }
    Property Value
    Type Description
    bool
    View Source

    PreFilters

    Declaration
    public IList<string> PreFilters { get; }
    Property Value
    Type Description
    IList<string>
    View Source

    RandomSeed

    Declaration
    public int RandomSeed { get; }
    Property Value
    Type Description
    int
    View Source

    RandomSeedSpecified

    Declaration
    public bool RandomSeedSpecified { get; }
    Property Value
    Type Description
    bool
    View Source

    ResultOutputSpecifications

    Declaration
    public IList<OutputSpecification> ResultOutputSpecifications { get; }
    Property Value
    Type Description
    IList<OutputSpecification>
    View Source

    ShowHelp

    Declaration
    public bool ShowHelp { get; }
    Property Value
    Type Description
    bool
    View Source

    ShowVersion

    Declaration
    public bool ShowVersion { get; }
    Property Value
    Type Description
    bool
    View Source

    StopOnError

    Declaration
    public bool StopOnError { get; }
    Property Value
    Type Description
    bool
    View Source

    TeamCity

    Declaration
    public bool TeamCity { get; }
    Property Value
    Type Description
    bool
    View Source

    TestList

    Declaration
    public IList<string> TestList { get; }
    Property Value
    Type Description
    IList<string>
    View Source

    TestParameters

    Declaration
    public IDictionary<string, string> TestParameters { get; }
    Property Value
    Type Description
    IDictionary<string, string>
    View Source

    WaitBeforeExit

    Declaration
    public bool WaitBeforeExit { get; }
    Property Value
    Type Description
    bool
    View Source

    WhereClause

    Declaration
    public string WhereClause { get; }
    Property Value
    Type Description
    string
    View Source

    WhereClauseSpecified

    Declaration
    public bool WhereClauseSpecified { get; }
    Property Value
    Type Description
    bool
    View Source

    WorkDirectory

    Declaration
    public string WorkDirectory { get; }
    Property Value
    Type Description
    string
    View Source

    WorkDirectorySpecified

    Declaration
    public bool WorkDirectorySpecified { get; }
    Property Value
    Type Description
    bool

    Methods

    View Source

    CheckOptionCombinations()

    Declaration
    protected virtual void CheckOptionCombinations()
    View Source

    ConfigureOptions(bool)

    Declaration
    protected virtual void ConfigureOptions(bool allowInputFile)
    Parameters
    Type Name Description
    bool allowInputFile
    View Source

    RequiredInt(string, string)

    Declaration
    protected int RequiredInt(string val, string option)
    Parameters
    Type Name Description
    string val
    string option
    Returns
    Type Description
    int
    View Source

    RequiredValue(string, string, params string[])

    Case is ignored when val is compared to validValues. When a match is found, the returned value will be in the canonical case from validValues.

    Declaration
    protected string RequiredValue(string val, string option, params string[] validValues)
    Parameters
    Type Name Description
    string val
    string option
    string[] validValues
    Returns
    Type Description
    string
    View Source

    Validate()

    Declaration
    public bool Validate()
    Returns
    Type Description
    bool

    Implements

    IList<T>
    ICollection<T>
    IList
    ICollection
    IReadOnlyList<T>
    IReadOnlyCollection<T>
    IEnumerable<T>
    IEnumerable
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0