// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. using System; using System.Collections.Generic; namespace System.Reactive { abstract class ConcatSink : TailRecursiveSink { public ConcatSink(IObserver observer, IDisposable cancel) : base(observer, cancel) { } protected override IEnumerable> Extract(IObservable source) { var concat = source as IConcatenatable; if (concat != null) return concat.GetSources(); return null; } public override void OnCompleted() { _recurse(); } } }