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

ReactiveUI.Primitives.Core.Spark<T>

public struct Spark<T> : IEquatable<Spark<T>>
Represents a value, error, or completion notification.
public Exception Exception { get; }

Gets the exception carried by an OnError spark, or null for any other kind.

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 for an OnNext notification, or the default value for an error or completion notification.

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 both sparks carry the same observer message payload: the same Kind and, for OnNext and OnError, the same value or exception.

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.