// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. namespace System.Reactive.Linq.ObservableImpl { internal sealed class AsObservable : Producer._>, IEvaluatableObservable { private readonly IObservable _source; public AsObservable(IObservable source) { _source = source; } public IObservable Eval() => _source; protected override _ CreateSink(IObserver observer) => new(observer); protected override void Run(_ sink) => sink.Run(_source); internal sealed class _ : IdentitySink { public _(IObserver observer) : base(observer) { } } } }