Table of Contents

Class Options

Namespace
OneImlx.Terminal.Commands
Assembly
OneImlx.Terminal.dll

The ordered Option keyed collection.

public sealed class Options : IReadOnlyDictionary<string, Option>, IReadOnlyCollection<KeyValuePair<string, Option>>, IEnumerable<KeyValuePair<string, Option>>, IEnumerable
Inheritance
Options
Implements
Inherited Members

Constructors

Options(ITerminalTextHandler, IEnumerable<Option>?)

Initializes a new instance.

public Options(ITerminalTextHandler textHandler, IEnumerable<Option>? options = null)

Parameters

textHandler ITerminalTextHandler

The text handler.

options IEnumerable<Option>

The options.

Properties

Count

public int Count { get; }

Property Value

int

this[string]

public Option this[string key] { get; }

Parameters

key string

Property Value

Option

Keys

public IEnumerable<string> Keys { get; }

Property Value

IEnumerable<string>

TextHandler

The text handler.

public ITerminalTextHandler TextHandler { get; }

Property Value

ITerminalTextHandler

Values

public IEnumerable<Option> Values { get; }

Property Value

IEnumerable<Option>

Methods

ContainsKey(string)

public bool ContainsKey(string key)

Parameters

key string

Returns

bool

GetEnumerator()

public IEnumerator<KeyValuePair<string, Option>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<string, Option>>

GetOptionValue<TValue>(string)

Gets the option value by its id.

public TValue GetOptionValue<TValue>(string optId)

Parameters

optId string

The option identifier or the alias.

Returns

TValue

Type Parameters

TValue

TryGetValue(string, out Option)

public bool TryGetValue(string key, out Option value)

Parameters

key string
value Option

Returns

bool