Table of Contents

Class TrackedPropertyBase

Namespace
ATAS.Indicators.Filters
Assembly
ATAS.Indicators.dll

A base class for tracking property changes and notifying subscribers when a property value is modified.

public class TrackedPropertyBase
Inheritance
object
TrackedPropertyBase
Derived
Extension Methods

Constructors

TrackedPropertyBase()

public TrackedPropertyBase()

Methods

OnChangeProperty(string)

Notifies subscribers when a property value changes.

protected virtual void OnChangeProperty(string propertyName = "")

Parameters

propertyName string

The name of the property whose value has changed.

SetProperty<TProperty>(ref TProperty, TProperty, Action?, Func<TProperty, bool>?, string)

Sets the value of a property and notifies subscribers if the value has changed.

Added in ATAS 8.0.15.

protected void SetProperty<TProperty>(ref TProperty store, TProperty value, Action? onChanged = null, Func<TProperty, bool>? onChanging = null, string propertyName = "")

Parameters

store TProperty

Reference to the backing field of the property.

value TProperty

The new value to set.

onChanged Action

Optional action to be executed after the property value has changed.

onChanging Func<TProperty, bool>

Optional function to be executed before the property value changes to determine if the value can be changed.

propertyName string

The name of the property.

Type Parameters

TProperty

The type of the property.

SetTrackedProperty<TProperty>(ref TProperty, TProperty, Action<string>?, string)

Sets the value of a property that implements the System.ComponentModel.INotifyPropertyChanged interface and notifies subscribers if the value has changed.

Added in ATAS 8.0.15.

protected void SetTrackedProperty<TProperty>(ref TProperty store, TProperty value, Action<string>? onChanged = null, string propertyName = "") where TProperty : class, INotifyPropertyChanged

Parameters

store TProperty

Reference to the backing field of the property.

value TProperty

The new value to set.

onChanged Action<string>

Optional action to be executed after the property value has changed.

propertyName string

The name of the property.

Type Parameters

TProperty

The type of the property that implements the System.ComponentModel.INotifyPropertyChanged interface.

Events

PropertyChanged

Added in ATAS 8.0.15.

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler