/// <summary> /// Gets the named observable. /// </summary> /// <param name="source">The source.</param> /// <returns>IObservable<System.String>.</returns> public static IObservable <string> GetNamedObservable(this INotifyChanges source) { var eventArgSeq = Observable.FromEventPattern <PropertyChangedEventHandler, PropertyChangedEventArgs>( eh => source.ValueChangedWithNameOnly += eh, eh => source.ValueChangedWithNameOnly -= eh); return(eventArgSeq.Select( x => x.EventArgs.PropertyName )); ; }
/// <summary> /// Gets the null observable. /// </summary> /// <param name="source">The source.</param> /// <returns>IObservable<System.Object>.</returns> public static IObservable <object> GetNullObservable(this INotifyChanges source) { var eventArgSeq = Observable.FromEventPattern( eh => source.ValueChangedWithNothing += eh, eh => source.ValueChangedWithNothing -= eh); return(eventArgSeq.Select( x => null as object )); ; }