Show / Hide Table of Contents

Class NotifyPropertyChangedExtensions

Extensions for System.ComponentModel.INotifyPropertyChanged interface implementations.

Inheritance
System.Object
NotifyPropertyChangedExtensions
Namespace: MAT.Atlas.Api.Core.Extensions
Assembly: MAT.Atlas.Api.Core.dll
Syntax
public static class NotifyPropertyChangedExtensions : Object

Methods

SubscribeToPropertyChangedEvent<TSource, TProperty>(TSource, Expression<Func<TSource, TProperty>>, Action<TProperty>)

Subscribes to System.ComponentModel.INotifyPropertyChanged.PropertyChanged event for a specific property defined by propertyExpression.

Declaration
public static IDisposable SubscribeToPropertyChangedEvent<TSource, TProperty>(this TSource bindable, Expression<Func<TSource, TProperty>> propertyExpression, Action<TProperty> handler)
    where TSource : INotifyPropertyChanged
Parameters
Type Name Description
TSource bindable

The object to subscribe to.

System.Linq.Expressions.Expression<System.Func<TSource, TProperty>> propertyExpression

Lambda expression, which defines the property.

System.Action<TProperty> handler

The delegate, which will be called, when the value of the property has been changed.

Returns
Type Description
System.IDisposable

The object of type System.IDisposable, which can be used to remove the subscription once not needed anymore.

Type Parameters
Name Description
TSource

The type the property belongs to.

TProperty

The type of the property.

In This Article
Back to top Generated by DocFX