ATAS
Loading...
Searching...
No Matches
ATAS.Indicators.Filters.TrackedPropertyBase Class Reference

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

Inheritance diagram for ATAS.Indicators.Filters.TrackedPropertyBase:
[legend]
Collaboration diagram for ATAS.Indicators.Filters.TrackedPropertyBase:
[legend]

Protected Member Functions

void SetProperty< TProperty > (ref TProperty store, TProperty value, Action onChanged=null, Func< TProperty, bool > onChanging=null, [CallerMemberName] string propertyName="")
 Sets the value of a property and notifies subscribers if the value has changed.
 
void SetTrackedProperty< TProperty > (ref TProperty store, TProperty value, Action< string > onChanged=null, [CallerMemberName] string propertyName="")
 Sets the value of a property that implements the INotifyPropertyChanged interface and notifies subscribers if the value has changed.
 
virtual void OnChangeProperty ([CallerMemberName] string propertyName="")
 Notifies subscribers when a property value changes.
 

Events

PropertyChangedEventHandler PropertyChanged
 

Detailed Description

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

Member Function Documentation

◆ OnChangeProperty()

virtual void ATAS.Indicators.Filters.TrackedPropertyBase.OnChangeProperty ( [CallerMemberName] string  propertyName = "")
protectedvirtual

Notifies subscribers when a property value changes.

Parameters
propertyNameThe name of the property whose value has changed.

◆ SetProperty< TProperty >()

void ATAS.Indicators.Filters.TrackedPropertyBase.SetProperty< TProperty > ( ref TProperty  store,
TProperty  value,
Action  onChanged = null,
Func< TProperty, bool >  onChanging = null,
[CallerMemberName] string  propertyName = "" 
)
protected

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

Template Parameters
TPropertyThe type of the property.
Parameters
storeReference to the backing field of the property.
valueThe new value to set.
onChangedOptional action to be executed after the property value has changed.
onChangingOptional function to be executed before the property value changes to determine if the value can be changed.
propertyNameThe name of the property.

◆ SetTrackedProperty< TProperty >()

void ATAS.Indicators.Filters.TrackedPropertyBase.SetTrackedProperty< TProperty > ( ref TProperty  store,
TProperty  value,
Action< string >  onChanged = null,
[CallerMemberName] string  propertyName = "" 
)
protected

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

Template Parameters
TPropertyThe type of the property that implements the INotifyPropertyChanged interface.
Parameters
storeReference to the backing field of the property.
valueThe new value to set.
onChangedOptional action to be executed after the property value has changed.
propertyNameThe name of the property.
Type Constraints
TProperty :class 
TProperty :INotifyPropertyChanged 

Event Documentation

◆ PropertyChanged

PropertyChangedEventHandler ATAS.Indicators.Filters.TrackedPropertyBase.PropertyChanged


The documentation for this class was generated from the following file: