Class StreamTypeOption

Represents a selectable stream type rendered as a checkbox in the UI.

Inheritance
StreamTypeOption
Namespace: MOSAIC.ViewModels.Devices
Assembly: MOSAIC.dll
Syntax
public class StreamTypeOption : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging

Constructors

StreamTypeOption(EspStreamType, string, bool)

Initialises a stream type option.

Declaration
public StreamTypeOption(EspStreamType type, string label, bool selected = false)
Parameters
Type Name Description
EspStreamType type
string label
bool selected

Fields

_isSelected

Whether this stream type is currently selected.

Declaration
[ObservableProperty]
private bool _isSelected
Field Value
Type Description
bool

Properties

IsSelected

Whether this stream type is currently selected.

Declaration
[ExcludeFromCodeCoverage]
public bool IsSelected { get; set; }
Property Value
Type Description
bool

Label

Display label for the checkbox.

Declaration
public string Label { get; }
Property Value
Type Description
string

Type

The stream type this option represents.

Declaration
public EspStreamType Type { get; }
Property Value
Type Description
EspStreamType

Methods

OnIsSelectedChanged(bool)

Executes the logic for when IsSelected just changed.

Declaration
private void OnIsSelectedChanged(bool value)
Parameters
Type Name Description
bool value

The new property value that was set.

Remarks

This method is invoked right after the value of IsSelected is changed.

OnIsSelectedChanged(bool, bool)

Executes the logic for when IsSelected just changed.

Declaration
private void OnIsSelectedChanged(bool oldValue, bool newValue)
Parameters
Type Name Description
bool oldValue

The previous property value that was replaced.

bool newValue

The new property value that was set.

Remarks

This method is invoked right after the value of IsSelected is changed.

OnIsSelectedChanging(bool)

Executes the logic for when IsSelected is changing.

Declaration
private void OnIsSelectedChanging(bool value)
Parameters
Type Name Description
bool value

The new property value being set.

Remarks

This method is invoked right before the value of IsSelected is changed.

OnIsSelectedChanging(bool, bool)

Executes the logic for when IsSelected is changing.

Declaration
private void OnIsSelectedChanging(bool oldValue, bool newValue)
Parameters
Type Name Description
bool oldValue

The previous property value that is being replaced.

bool newValue

The new property value being set.

Remarks

This method is invoked right before the value of IsSelected is changed.

Implements

INotifyPropertyChanged
INotifyPropertyChanging

Search documentation

Start typing to search the documentation.