<PackageReference Include="System.Reactive" Version="6.0.0-preview.13" />

Dematerialize<TSource>

sealed class Dematerialize<TSource> : Producer<TSource, _<TSource>>
using System.Runtime.CompilerServices; namespace System.Reactive.Linq.ObservableImpl { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(new byte[] { 0, 1, 1, 1 })] internal sealed class Dematerialize<[System.Runtime.CompilerServices.Nullable(2)] TSource> : Producer<TSource, Dematerialize<TSource>._> { [System.Runtime.CompilerServices.Nullable(new byte[] { 0, 1, 1, 1 })] internal sealed class _ : Sink<Notification<TSource>, TSource> { public _(IObserver<TSource> observer) : base(observer) { } public override void OnNext(Notification<TSource> value) { switch (value.Kind) { case NotificationKind.OnNext: ForwardOnNext(value.Value); break; case NotificationKind.OnError: ForwardOnError(value.Exception); break; case NotificationKind.OnCompleted: ForwardOnCompleted(); break; } } } private readonly IObservable<Notification<TSource>> _source; public Dematerialize(IObservable<Notification<TSource>> source) { _source = source; } [return: System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] protected override _ CreateSink(IObserver<TSource> observer) { return new _(observer); } protected override void Run([System.Runtime.CompilerServices.Nullable(new byte[] { 1, 0 })] _ sink) { sink.Run(_source); } } }