Class ObservedChangedMixin
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
A collection of helpers for IObservedChange<TSender, TValue>.
- Inheritance
-
Observed
Changed Mixin
Methods
GetPropertyName<TSender, TValue>(IObservedChange<TSender, TValue>)
Returns the name of a property which has been changed.
Parameters
item
IObservedChange <TSender, TValue>The observed change.
Returns
- string
The name of the property which has changed.
Type Parameters
TSender
The sender type.
TValue
The value type.
GetValueOrDefault<TSender, TValue>(IObservedChange<TSender, TValue>)
Returns the current value of a property given a notification that it has changed.
public static TValue? GetValueOrDefault<TSender, TValue>(this IObservedChange<TSender, TValue> item)
Parameters
item
IObservedChange <TSender, TValue>The IObservedChange<TSender, TValue> instance to get the value of.
Returns
- TValue
The current value of the property.
Type Parameters
TSender
The sender.
TValue
The changed value.
GetValue<TSender, TValue>(IObservedChange<TSender, TValue>)
Returns the current value of a property given a notification that it has changed.
Parameters
item
IObservedChange <TSender, TValue>The IObservedChange<TSender, TValue> instance to get the value of.
Returns
- TValue
The current value of the property.
Type Parameters
TSender
The sender.
TValue
The changed value.
Value<TSender, TValue>(IObservable<IObservedChange<TSender, TValue>>)
Given a stream of notification changes, this method will convert the property changes to the current value of the property.
public static IObservable<TValue> Value<TSender, TValue>(this IObservable<IObservedChange<TSender, TValue>> item)
Parameters
item
IObservable<IObservedChange <TSender, TValue>>The change notification stream to get the values of.
Returns
- IObservable<TValue>
An Observable representing the stream of current values of the given change notification stream.
Type Parameters
TSender
The sender type.
TValue
The value type.