Interface INotifyPropertyChangeBase
Define una serie de miembros a implementar por un tipo que permita notificar cambios en los valores de propiedades.
Inherited Members
Namespace: TheXDS.MCART.Types.Base
Assembly: MCART.Mvvm.dll
Syntax
public interface INotifyPropertyChangeBase : IRefreshable
Methods
| Edit this page View SourceSubscribe(Expression<Func<object?>>, PropertyChangeObserver)
Subscribes a delegate to be executed when a specific property changes its value.
Declaration
void Subscribe(Expression<Func<object?>> propertySelector, PropertyChangeObserver callback)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<object>> | propertySelector | Expression that selects the property to subscribe the action for. |
PropertyChangeObserver | callback | Action to execute when the property changes its value. |
Subscribe(PropertyInfo?, PropertyChangeObserver)
Subscribes a delegate to be executed when a specific property changes its value.
Declaration
void Subscribe(PropertyInfo? property, PropertyChangeObserver callback)
Parameters
Type | Name | Description |
---|---|---|
PropertyInfo | property | Property to subscribe the action for. |
PropertyChangeObserver | callback | Action to execute when the property changes its value. |
Subscribe(PropertyChangeObserver)
Subscribes a delegate to be executed when any property changes its value.
Declaration
void Subscribe(PropertyChangeObserver callback)
Parameters
Type | Name | Description |
---|---|---|
PropertyChangeObserver | callback | Action to execute when the property changes its value. |
Unsubscribe(Expression<Func<object?>>)
Removes all previously subscribed actions for the specified property.
Declaration
bool Unsubscribe(Expression<Func<object?>> propertySelector)
Parameters
Type | Name | Description |
---|---|---|
Expression<Func<object>> | propertySelector | Expression that selects the property to unsubscribe the previously subscribed actions for. |
Returns
Type | Description |
---|---|
bool |
Unsubscribe(PropertyInfo?)
Removes all previously subscribed actions for the specified property.
Declaration
bool Unsubscribe(PropertyInfo? property)
Parameters
Type | Name | Description |
---|---|---|
PropertyInfo | property | Property for which to remove all subscribed observers. If null is passed, all global subcribers for this instance will be removed. |
Returns
Type | Description |
---|---|
bool | true if there was a previously registered callback to invoke when the specified property changed its value and has beed removed successfully, false otherwise. |
Unsubscribe(PropertyChangeObserver)
Removes the previously subscribed property change observer.
Declaration
void Unsubscribe(PropertyChangeObserver callback)
Parameters
Type | Name | Description |
---|---|---|
PropertyChangeObserver | callback | Delegeta to unsubscribe. |