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
-
objectTrackedPropertyBase
- Derived
- Extension Methods
Constructors
TrackedPropertyBase()
public TrackedPropertyBase()
Methods
OnChangeProperty(string)
Notifies subscribers when a property value changes.
protected virtual void OnChangeProperty(string propertyName = "")
Parameters
propertyNamestringThe 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
storeTPropertyReference to the backing field of the property.
valueTPropertyThe new value to set.
onChangedActionOptional action to be executed after the property value has changed.
onChangingFunc<TProperty, bool>Optional function to be executed before the property value changes to determine if the value can be changed.
propertyNamestringThe name of the property.
Type Parameters
TPropertyThe 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
storeTPropertyReference to the backing field of the property.
valueTPropertyThe new value to set.
onChangedAction<string>Optional action to be executed after the property value has changed.
propertyNamestringThe name of the property.
Type Parameters
TPropertyThe 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