Skip to content
ConsoleMonster

API Reference

Class

FormValues

Namespace ConsoleMonster.Interactive
Assembly ConsoleMonster
Implements
IEnumerable<KeyValuePair<String, Object>> IEnumerable
Modifiers sealed
Attributes
DefaultMember("Item")

The values of a form by field name: typed access (FormValues.Get), multi-selections as lists, and only the fields that are visible in FormValues.Visible.

Inheritance

  • Object
  • FormValues

Usage

Explore 21 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Constructors

public FormValues() #

Methods

public Boolean Contains(String name) #
Returns: Boolean

Whether a field exists.

Parameters

name System.String requiredposition: 0
The field name.

Returns

True when it exists.

public IEnumerator<KeyValuePair<String, Object?>> GetEnumerator() #
Returns: IEnumerator<KeyValuePair<String, Object?>>

Returns an enumerator that iterates through the collection.

Returns

An enumerator that can be used to iterate through the collection.

public IReadOnlyList<TItem?> GetList<TItem>(String name) #
Returns: IReadOnlyList<TItem?>

A multi-selection (or a single value) as a typed list.

Type Parameters

TItem
The item type.

Parameters

name System.String requiredposition: 0
The field name.

Returns

The items that have the type.

public T? Get<T>(String name, T? fallback = null) #
Returns: T?

The value converted to T (lists for multi-selections), or the default.

Type Parameters

T
The type.

Parameters

name System.String requiredposition: 0
The field name.
fallback T? = null optionalposition: 1
Returned when the field is empty.

Returns

The value.

public Boolean IsVisible(String name) #
Returns: Boolean

Whether a field is currently shown (its condition holds).

Parameters

name System.String requiredposition: 0
The field name.

Returns

True when visible.

public Dictionary<String, Object?> ToDictionary() #
Returns: Dictionary<String, Object?>

A plain dictionary of the visible values.

Returns

The dictionary.

Properties

public Object? this[String name] { get; } #

The value of a field, or null.

Parameters

name System.String requiredposition: 0
The field name.
public IReadOnlyCollection<String> Visible { get; } #

The names of the visible fields.