Class OptionSet | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class OptionSet

    Inheritance
    System.Object
    System.Collections.ObjectModel.Collection<Option>
    System.Collections.ObjectModel.KeyedCollection<System.String, Option>
    OptionSet
    Namespace: NDesk.Options
    Syntax
    public class OptionSet : KeyedCollection<string, Option>, IList<Option>, ICollection<Option>, IList, ICollection, IReadOnlyList<Option>, IReadOnlyCollection<Option>, IEnumerable<Option>, IEnumerable

    Constructors

    OptionSet()

    Declaration
    public OptionSet()

    OptionSet(Converter<String, String>)

    Declaration
    public OptionSet(Converter<string, string> localizer)
    Parameters
    Type Name Description
    System.Converter<System.String, System.String> localizer

    Properties

    MessageLocalizer

    Declaration
    public Converter<string, string> MessageLocalizer { get; }
    Property Value
    Type Description
    System.Converter<System.String, System.String>

    Methods

    Add(Option)

    Declaration
    public OptionSet Add(Option option)
    Parameters
    Type Name Description
    Option option
    Returns
    Type Description
    OptionSet

    Add(String, OptionAction<String, String>)

    Declaration
    public OptionSet Add(string prototype, OptionAction<string, string> action)
    Parameters
    Type Name Description
    System.String prototype
    OptionAction<System.String, System.String> action
    Returns
    Type Description
    OptionSet

    Add(String, Action<String>)

    Declaration
    public OptionSet Add(string prototype, Action<string> action)
    Parameters
    Type Name Description
    System.String prototype
    System.Action<System.String> action
    Returns
    Type Description
    OptionSet

    Add(String, String, OptionAction<String, String>)

    Declaration
    public OptionSet Add(string prototype, string description, OptionAction<string, string> action)
    Parameters
    Type Name Description
    System.String prototype
    System.String description
    OptionAction<System.String, System.String> action
    Returns
    Type Description
    OptionSet

    Add(String, String, Action<String>)

    Declaration
    public OptionSet Add(string prototype, string description, Action<string> action)
    Parameters
    Type Name Description
    System.String prototype
    System.String description
    System.Action<System.String> action
    Returns
    Type Description
    OptionSet

    Add<T>(String, Action<T>)

    Declaration
    public OptionSet Add<T>(string prototype, Action<T> action)
    Parameters
    Type Name Description
    System.String prototype
    System.Action<T> action
    Returns
    Type Description
    OptionSet
    Type Parameters
    Name Description
    T

    Add<T>(String, String, Action<T>)

    Declaration
    public OptionSet Add<T>(string prototype, string description, Action<T> action)
    Parameters
    Type Name Description
    System.String prototype
    System.String description
    System.Action<T> action
    Returns
    Type Description
    OptionSet
    Type Parameters
    Name Description
    T

    Add<TKey, TValue>(String, OptionAction<TKey, TValue>)

    Declaration
    public OptionSet Add<TKey, TValue>(string prototype, OptionAction<TKey, TValue> action)
    Parameters
    Type Name Description
    System.String prototype
    OptionAction<TKey, TValue> action
    Returns
    Type Description
    OptionSet
    Type Parameters
    Name Description
    TKey
    TValue

    Add<TKey, TValue>(String, String, OptionAction<TKey, TValue>)

    Declaration
    public OptionSet Add<TKey, TValue>(string prototype, string description, OptionAction<TKey, TValue> action)
    Parameters
    Type Name Description
    System.String prototype
    System.String description
    OptionAction<TKey, TValue> action
    Returns
    Type Description
    OptionSet
    Type Parameters
    Name Description
    TKey
    TValue

    CreateOptionContext()

    Declaration
    protected virtual OptionContext CreateOptionContext()
    Returns
    Type Description
    OptionContext

    GetKeyForItem(Option)

    Declaration
    protected override string GetKeyForItem(Option item)
    Parameters
    Type Name Description
    Option item
    Returns
    Type Description
    System.String
    Overrides
    System.Collections.ObjectModel.KeyedCollection<System.String, NDesk.Options.Option>.GetKeyForItem(NDesk.Options.Option)

    GetOptionForName(String)

    Declaration
    [Obsolete("Use KeyedCollection.this[string]")]
    protected Option GetOptionForName(string option)
    Parameters
    Type Name Description
    System.String option
    Returns
    Type Description
    Option

    GetOptionParts(String, out String, out String, out String, out String)

    Declaration
    protected bool GetOptionParts(string argument, out string flag, out string name, out string sep, out string value)
    Parameters
    Type Name Description
    System.String argument
    System.String flag
    System.String name
    System.String sep
    System.String value
    Returns
    Type Description
    System.Boolean

    InsertItem(Int32, Option)

    Declaration
    protected override void InsertItem(int index, Option item)
    Parameters
    Type Name Description
    System.Int32 index
    Option item
    Overrides
    System.Collections.ObjectModel.KeyedCollection<System.String, NDesk.Options.Option>.InsertItem(System.Int32, NDesk.Options.Option)

    Parse(IEnumerable<String>)

    Declaration
    public List<string> Parse(IEnumerable<string> arguments)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.String> arguments
    Returns
    Type Description
    System.Collections.Generic.List<System.String>

    Parse(String, OptionContext)

    Declaration
    protected virtual bool Parse(string argument, OptionContext c)
    Parameters
    Type Name Description
    System.String argument
    OptionContext c
    Returns
    Type Description
    System.Boolean

    RemoveItem(Int32)

    Declaration
    protected override void RemoveItem(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Overrides
    System.Collections.ObjectModel.KeyedCollection<System.String, NDesk.Options.Option>.RemoveItem(System.Int32)

    SetItem(Int32, Option)

    Declaration
    protected override void SetItem(int index, Option item)
    Parameters
    Type Name Description
    System.Int32 index
    Option item
    Overrides
    System.Collections.ObjectModel.KeyedCollection<System.String, NDesk.Options.Option>.SetItem(System.Int32, NDesk.Options.Option)

    WriteOptionDescriptions(TextWriter)

    Declaration
    public void WriteOptionDescriptions(TextWriter o)
    Parameters
    Type Name Description
    System.IO.TextWriter o
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023