Source/Common/Core/Extensions/ObservableExtensions.cs
/// <summary>
///     Gets all values from observable that arrives synchronously when subscribing to it,
///     then returns the last of those values.
/// </summary>
Gets all values from observable that arrives synchronously when subscribing to it,
then returns the last of those values.
Gets all values from observable that arrives synchronously when subscribing to it then returns the last of those values .
public static T LastNonBlocking<T>(this IObservable<T> source)
		{
			Optional<T> result = Optional.None();
			Exception exception = null;
			using (source.Subscribe(v => result = v, ex => exception = ex)) { }
			if (exception != null)
				throw new InvalidOperationException("Got error while trying to pull out last value", exception);
			return result.OrThrow(new InvalidOperationException("No pullable value"));
		}
public static T LastNonBlocking < T > ( this IObservable < T > source ) { Optional < T > result = Optional . None ( ) ; Exception exception = null ; using ( source . Subscribe ( v => result = v , ex => exception = ex ) ) { } if ( exception != null ) throw new InvalidOperationException ( " " , exception ) ; return result . OrThrow ( new InvalidOperationException ( " " ) ) ; }
Gets all values from observable that arrives synchronously when subscribing to it,
then returns the last of those values.
Gets all values from observable that arrives synchronously when subscribing to it then returns the last of those values .
IObservable<T>
this