Table of Contents

Class MaterializeOperator

Namespace
RxSharp.Operators
Assembly
RxSharp.dll

Extension methods implementing the materialize and dematerialize operators.

public static class MaterializeOperator
Inheritance
System.Object
MaterializeOperator

Methods

Dematerialize<T>(Observable<Notification<T>>)

Converts each Notification<T> value emitted by source back into a real next/error/complete notification, the inverse of Materialize<T>(Observable<T>). A Next value is unwrapped and forwarded via OnNext; a Error value terminates the output via OnError; a Completed value terminates the output via OnCompleted. If source itself errors or completes without emitting a matching notification value, that is forwarded unchanged.

public static Observable<T> Dematerialize<T>(this Observable<Notification<T>> source)

Parameters

source Observable<Notification<T>>

The source sequence of notifications to dematerialize.

Returns

Observable<T>

An observable of the unwrapped values, terminating as directed by each notification.

Type Parameters

T

The type of values carried by the Notification<T> values from source.

Materialize<T>(Observable<T>)

Converts each next/error/complete notification from source into an explicit Notification<T> value emitted through the stream, so e.g. an error becomes a value rather than terminating the stream. The output itself always completes normally: a Notification<T> wrapping the error (or the completion) is emitted first, immediately followed by OnCompleted.

public static Observable<Notification<T>> Materialize<T>(this Observable<T> source)

Parameters

source Observable<T>

The source sequence to materialize.

Returns

Observable<Notification<T>>

An observable of Notification<T> values: one Next per value from source, followed by a single terminal Error or Completed notification and then OnCompleted.

Type Parameters

T

The type of values emitted by source.