Show / Hide Table of Contents

Class INotifyPropertyChangedExtensions

Extension methods for INotifyPropertyChanged.

Inheritance
object
INotifyPropertyChangedExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Phoenix.BotBrain.Extensions
Assembly: Phoenix.Plugin.BotBrain.Shared.dll
Syntax
public static class INotifyPropertyChangedExtensions

Methods

View Source

OnPropertyChanged(INotifyPropertyChanged, string, Action)

Sets up a trigger for an action whenever the given property changes.

Declaration
public static PropertyChangedEventHandler OnPropertyChanged(this INotifyPropertyChanged self, string propertyName, Action action)
Parameters
Type Name Description
INotifyPropertyChanged self

The object being extended.

string propertyName

The property name.

Action action

The trigger action.

Returns
Type Description
PropertyChangedEventHandler

The event handler.

View Source

OnPropertyChanged(INotifyPropertyChanged, string, Action<object?, string>)

Sets up a trigger for an action whenever the given property changes.

Declaration
public static PropertyChangedEventHandler OnPropertyChanged(this INotifyPropertyChanged self, string propertyName, Action<object?, string> action)
Parameters
Type Name Description
INotifyPropertyChanged self

The object being extended.

string propertyName

The property name.

Action<object, string> action

The trigger action, which has arguments for the changed object and property.

Returns
Type Description
PropertyChangedEventHandler

The event handler.

View Source

OnPropertyChangedUntil(INotifyPropertyChanged, string, Func<bool>)

Sets up a trigger for an action whenever the given property changes.

Declaration
public static PropertyChangedEventHandler OnPropertyChangedUntil(this INotifyPropertyChanged self, string propertyName, Func<bool> trigger)
Parameters
Type Name Description
INotifyPropertyChanged self

The object being extended.

string propertyName

The property name.

Func<bool> trigger

The trigger action, which may return true to unsubscribe.

Returns
Type Description
PropertyChangedEventHandler

The event handler.

View Source

OnPropertyChangedUntil(INotifyPropertyChanged, string, Func<object?, string, bool>)

Sets up a trigger for an action whenever the given property changes.

Declaration
public static PropertyChangedEventHandler OnPropertyChangedUntil(this INotifyPropertyChanged self, string propertyName, Func<object?, string, bool> trigger)
Parameters
Type Name Description
INotifyPropertyChanged self

The object being extended.

string propertyName

The property name.

Func<object, string, bool> trigger

The trigger action, which may return true to unsubscribe, and has arguments for the changed object and property.

Returns
Type Description
PropertyChangedEventHandler

The event handler.

  • View Source
In this article
Back to top Generated by DocFX