Table of Contents

Class SwitchInputField<T>

Namespace
AbanoubNassem.Trinity.Fields
Assembly
AbanoubNassem.Trinity.dll

Represents a switch input field in Trinity.

public class SwitchInputField<T> : TrinityField<SwitchInputField<T>, T>, ITrinityComponent, ITrinityField, IFormComponent

Type Parameters

T

The type of the value to be stored in the switch input field.

Inheritance
SwitchInputField<T>
Implements
Derived
Inherited Members

Constructors

SwitchInputField(string)

public SwitchInputField(string columnName)

Parameters

columnName string

Properties

ComponentName

The component name in the front-end side.

public override string ComponentName { get; }

Property Value

string

FalseValue

Gets or sets the value to be stored in the switch input field when the switch is turned off.

public T? FalseValue { get; protected set; }

Property Value

T

TrueValue

Gets or sets the value to be stored in the switch input field when the switch is turned on.

public T? TrueValue { get; protected set; }

Property Value

T

Methods

SetTrueFalseValue(T, T)

Sets the values to be stored in the switch input field when the switch is turned on and off, respectively.

public SwitchInputField<T> SetTrueFalseValue(T trueValue, T falseValue)

Parameters

trueValue T

The value to be stored when the switch is turned on.

falseValue T

The value to be stored when the switch is turned off.

Returns

SwitchInputField<T>

The SwitchInputField<T> instance.