<PackageReference Include="ReactiveUI.Primitives" Version="7.4.0" />

ReactiveUI.Primitives.Core.Spark<T>

public struct Spark<T> : IEquatable<Spark<T>>
Represents a spark to an observer. This is a by-value type: materializing a sequence allocates no per-notification heap object, mirroring the value-type notification used by other modern reactive libraries.
public Exception Exception { get; }

Gets the exception of an OnError spark or returns null.

public bool HasValue { get; }

Gets a value indicating whether the spark carries a value.

public SparkKind Kind { get; }

Gets the kind of Spark that is represented.

public T Value { get; }

Gets the value carried by an OnNext spark, or the default value for OnError and OnCompleted sparks. Check HasValue (or Kind) to determine whether the value is meaningful, and read Exception for the error carried by an OnError spark.

public static bool op_Equality(Spark<T> left, Spark<T> right)

public static bool op_Inequality(Spark<T> left, Spark<T> right)

public void Accept(IObserver<T> observer)

Invokes the observer's method corresponding to the Spark.

public TResult Accept<TResult>(IObserver<T, TResult> observer)

Invokes the observer's method corresponding to the Spark and returns the produced result.

public void Accept(Action<T> onNext, Action<Exception> onError, Action onCompleted)

Invokes the delegate corresponding to the Spark.

public TResult Accept<TResult>(Func<T, TResult> onNext, Func<Exception, TResult> onError, Func<TResult> onCompleted)

Invokes the delegate corresponding to the Spark and returns the produced result.

public bool Equals(Spark<T> other)

Determines whether the current Spark<T> object has the same observer message payload as a specified Spark<T> value.

Returns an observable sequence with a single Spark, using the immediate scheduler.

public IObservable<T> ToObservable(ISequencer scheduler)

Returns an observable sequence with a single Spark.